sql/group question --

2008-12-13 Thread bruce
Hi.. I have the following query.. missing something based on 'net searches. but how do i create a group to allow me to get a single row/count based on the 'd1_status.dept_id' i can't figure out exactly where in the query to have the count(*) xxx group by abc... the few different approaches i've

Re: GROUP question

2008-01-31 Thread Perrin Harkins
On Jan 30, 2008 5:25 PM, Jerry Schwartz [EMAIL PROTECTED] wrote: The problem starts when I try to fetch the memos. I want one email address, two or more customer_ids (so I can tell them apart), and all of the memos for each customer_id (preferably using GROUP_CONCAT(). In other words, this is

RE: GROUP question

2008-01-31 Thread Jerry Schwartz
To: Jerry Schwartz Cc: mysql@lists.mysql.com Subject: Re: GROUP question On Jan 30, 2008 5:25 PM, Jerry Schwartz [EMAIL PROTECTED] wrote: The problem starts when I try to fetch the memos. I want one email address, two or more customer_ids (so I can tell them apart), and all of the memos

Re: GROUP question

2008-01-31 Thread Perrin Harkins
On Jan 31, 2008 1:30 PM, Jerry Schwartz [EMAIL PROTECTED] wrote: That's rather what I feared. I'm trying to avoid code, mostly because this should be a one-off run. If it's a one-shot deal and you don't mind it taking a little time, I think something like this would work: SELECT

GROUP question

2008-01-30 Thread Jerry Schwartz
I have two tables that (simplified) look like this: customers = customer_id [integer, autoincrement] email [varchar] memos = memo_id [integer, autoincrement] customer_id [integer] memo_text [varchar] There are some duplicate email addresses in the customers table. A customer might