Re: Baffled by error

2006-05-16 Thread Mike Blezien
Gordon, thank you, works prefectly now. Mike - Original Message - From: "Gordon" <[EMAIL PROTECTED]> To: "'Mike Blezien'" <[EMAIL PROTECTED]>; "'MySQL List'" Sent: Tuesday, May 16, 2006 3:17 PM Subject: RE: Baffled by

RE: Baffled by error

2006-05-16 Thread Gordon
Try this SELECT c.account_id, a.name,a.company, SUM(c.agent_product_time) AS mins FROM account a LEFT JOIN calls c ON c.account_id = a.id WHERE c.calldate >= DATE_SUB(NOW(),INTERVAL 14 DAY) AND c.agent_id = 9 GROUP BY a.account_id HAVING SUM(c.agent_pr

Re: Baffled by error

2006-05-16 Thread Mike Blezien
Peter, - Original Message - From: "Peter Brawley" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]> Cc: "MySQL List" Sent: Tuesday, May 16, 2006 1:25 PM Subject: Re: Baffled by error Mike, >How would this query be constructed w

Re: Baffled by error

2006-05-16 Thread Peter Brawley
;MySQL List" Sent: Tuesday, May 16, 2006 1:07 PM Subject: Re: Baffled by error Mike Blezien wrote: Hello, MySQL 4.1.12 trying to figure out why I keep getting this error with the following query: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time) AS mins FROM account a LEFT

Re: Baffled by error

2006-05-16 Thread Mike Blezien
Peter, - Original Message - From: "Peter Brawley" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]> Cc: "MySQL List" Sent: Tuesday, May 16, 2006 1:07 PM Subject: Re: Baffled by error Mike Blezien wrote: Hello, MySQL 4.1.12 tr

Re: Baffled by error

2006-05-16 Thread Rhino
- Original Message - From: "Rhino" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]>; "MySQL List" Sent: Tuesday, May 16, 2006 1:56 PM Subject: Re: Baffled by error - Original Message - From: "Mike Blezien"

Re: Baffled by error

2006-05-16 Thread Peter Brawley
Mike Blezien wrote: Hello, MySQL 4.1.12 trying to figure out why I keep getting this error with the following query: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time) AS mins FROM account a LEFT JOIN calls c ON c.account_id = a.id WHERE c.calldate >= DATE_SUB(NOW(),INTERVAL 14

Re: Baffled by error

2006-05-16 Thread Mike Blezien
corrected it and still the same error. Mike - Original Message - From: "Chris Sansom" <[EMAIL PROTECTED]> To: "Mike Blezien" <[EMAIL PROTECTED]>; "MySQL List" Sent: Tuesday, May 16, 2006 12:56 PM Subject: Re: Baffled by error At 12:29 -05

Re: Baffled by error

2006-05-16 Thread Mike Blezien
MAIL PROTECTED]>; "'MySQL List'" Sent: Tuesday, May 16, 2006 12:58 PM Subject: RE: Baffled by error Is because in your select you have c.accound_id and in your group by clause you have a.accound_id Try this: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time)

RE: Baffled by error

2006-05-16 Thread Ing. Edwin Cruz
Is because in your select you have c.accound_id and in your group by clause you have a.accound_id Try this: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time) AS mins FROM account a LEFT JOIN calls c ON c.account_id = a.id WHERE c.calldate >= DATE_SUB(NOW(),INTERVAL 14 DAY) AND c.ag

Re: Baffled by error

2006-05-16 Thread Chris Sansom
At 12:29 -0500 16/5/06, Mike Blezien wrote: trying to figure out why I keep getting this error with the following query: SELECT c.account_id,a.name,a.company,SUM(c.agent_product_time) AS mins FROM account a LEFT JOIN calls c ON c.account_id = a.id WHERE c.calldate >= DATE_SUB(NOW(),INTERVAL 14

Re: Baffled by error

2006-05-16 Thread Rhino
- Original Message - From: "Mike Blezien" <[EMAIL PROTECTED]> To: "MySQL List" Sent: Tuesday, May 16, 2006 1:29 PM Subject: Baffled by error Hello, MySQL 4.1.12 trying to figure out why I keep getting this error with the following query: SELECT c.account_id,a.name,a.company,SUM