Re: MAX + SUM in one query

2006-11-06 Thread Arjan Hulshoff
and id same for both the tables. Is it so? Thanks ViSolve DB Team. - Original Message - From: "Ahmad Al-Twaijiry" <[EMAIL PROTECTED]> To: "Visolve DB Team" <[EMAIL PROTECTED]> Cc: "MySQL List" Sent: Monday, November 06, 2006 2:33 PM Subject: Re: MAX +

Re: MAX + SUM in one query

2006-11-06 Thread Ahmad Al-Twaijiry
#x27;offer' and id same for both the tables. Is it so? Thanks ViSolve DB Team. - Original Message - From: "Ahmad Al-Twaijiry" <[EMAIL PROTECTED]> To: "Visolve DB Team" <[EMAIL PROTECTED]> Cc: "MySQL List" Sent: Monday, November 06, 2006

Re: MAX + SUM in one query

2006-11-06 Thread Visolve DB Team
"Ahmad Al-Twaijiry" <[EMAIL PROTECTED]> To: "Visolve DB Team" <[EMAIL PROTECTED]> Cc: "MySQL List" Sent: Monday, November 06, 2006 2:33 PM Subject: Re: MAX + SUM in one query but what if I want also to include another table for example, can I do this : SE

Re: MAX + SUM in one query

2006-11-06 Thread Ahmad Al-Twaijiry
test where >> RequestType='offer' group by StockID; Pls have a look into the table and the output for the query. Thanks ViSolve DB Team. - Original Message - From: "Ahmad Al-Twaijiry" <[EMAIL PROTECTED]> To: "Visolve DB Team" <[EMAIL PROTECTE

Re: MAX + SUM in one query

2006-11-05 Thread Visolve DB Team
and the output for the query. Thanks ViSolve DB Team. - Original Message - From: "Ahmad Al-Twaijiry" <[EMAIL PROTECTED]> To: "Visolve DB Team" <[EMAIL PROTECTED]> Cc: "MySQL List" Sent: Monday, November 06, 2006 12:10 PM Subject: Re: MAX + SUM in

Re: MAX + SUM in one query

2006-11-05 Thread Ahmad Al-Twaijiry
Hi no R.RequestENDDate>=Date(now()) will work fine (I use it in other sql queries) also as you can see in my sql, I want to group using Stock_StockID , so your solution will not work with me On 11/5/06, Visolve DB Team <[EMAIL PROTECTED]> wrote: Hi, The query what you tried will return empty

Re: MAX + SUM in one query

2006-11-05 Thread Visolve DB Team
Hi, The query what you tried will return empty set only, since you have compared the RequestENDDate with now(), which always returns false[due to seconds]. Try extracting the date part alone from RequestENDDate for the Where cond. otherwise the query do well: select RequestID, sum(RequestTota