Re: help with correlated subquery

2012-08-23 Thread Larry Martell
On Thu, Aug 23, 2012 at 8:08 AM, Larry Martell wrote: > On Tue, Aug 21, 2012 at 8:26 PM, Larry Martell > wrote: >> On Tue, Aug 21, 2012 at 8:07 PM, wrote: >>> 2012/08/21 16:35 -0600, Larry Martell >>> I am trying to write a query that selects from both a correlated >>> subquery and a

Re: help with correlated subquery

2012-08-23 Thread Larry Martell
On Tue, Aug 21, 2012 at 8:26 PM, Larry Martell wrote: > On Tue, Aug 21, 2012 at 8:07 PM, wrote: >> 2012/08/21 16:35 -0600, Larry Martell >> I am trying to write a query that selects from both a correlated >> subquery and a table in the main query, and I'm having a lot of >> trouble gett

Re: help with correlated subquery

2012-08-22 Thread Shawn Green
Hello Martin, On 8/22/2012 8:30 AM, Martin Gainty wrote: assign realistic alias names OuterJoin should be called OuterJoin InnerJoin should be called InnerJoin Almost! MySQL does not have a simple OUTER JOIN command (some RDBMSes call this a FULL OUTER JOIN). What we do have is the option

RE: help with correlated subquery

2012-08-22 Thread Rick James
y.mart...@gmail.com] > Sent: Tuesday, August 21, 2012 7:27 PM > To: h...@tbbs.net > Cc: mysql@lists.mysql.com > Subject: Re: help with correlated subquery > > On Tue, Aug 21, 2012 at 8:07 PM, wrote: > >>>>> 2012/08/21 16:35 -0600, Larry Martell >>>> >

RE: help with correlated subquery

2012-08-22 Thread Martin Gainty
onné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Tue, 21 Aug 2012 20:26:51 -0600 > Subject: Re: help with correlated subquery > From: larry.mart...@gmail.com > To: h...@tbbs.net &g

Re: help with correlated subquery

2012-08-21 Thread Larry Martell
On Tue, Aug 21, 2012 at 8:07 PM, wrote: > 2012/08/21 16:35 -0600, Larry Martell > I am trying to write a query that selects from both a correlated > subquery and a table in the main query, and I'm having a lot of > trouble getting the proper row count. I'm sure this is very simple, > and

Re: help with correlated subquery

2012-08-21 Thread hsv
2012/08/21 16:35 -0600, Larry Martell I am trying to write a query that selects from both a correlated subquery and a table in the main query, and I'm having a lot of trouble getting the proper row count. I'm sure this is very simple, and I'm just missing it. I'll try and present a simple

Re: help with correlated subquery

2012-08-21 Thread Larry Martell
(0.00 sec) It only when I combine them that I am double counting the target, ep rows. I think I see why (there are 2 wafers for each target, ep), but I don't know how to avoid that. I need to group by target_name_id, ep, wafer_id in the inner query, and then I need to group by target_name_id, ep

Re: help with correlated subquery

2012-08-21 Thread Larry Martell
group by target_name_id, ep, wafer_id) x join (data_cst) on data_cst.target_name_id = x.t and ep = x.e group by target_name_id, ep; Returns the same result set. > >> -Original Message- >> From: Larry Martell [mailto:larry.mart...@gmail.com] >> Sent: Tuesday, August 21, 2

RE: help with correlated subquery

2012-08-21 Thread Rick James
; From: Larry Martell [mailto:larry.mart...@gmail.com] > Sent: Tuesday, August 21, 2012 3:35 PM > To: mysql mailing list > Subject: help with correlated subquery > > I am trying to write a query that selects from both a correlated > subquery and a table in the main query, and I'm

help with correlated subquery

2012-08-21 Thread Larry Martell
I am trying to write a query that selects from both a correlated subquery and a table in the main query, and I'm having a lot of trouble getting the proper row count. I'm sure this is very simple, and I'm just missing it. I'll try and present a simple example. For this example, there are 27 rows, o