RE: HELP! sql command question for mysql

2005-08-11 Thread Ben Smith
om: Scott Noyes [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 15:39 To: Ben Smith Cc: mysql@lists.mysql.com Subject: Re: HELP! sql command question for mysql > It appears that you don't need to > specify in the Group By clause all the columns that are referenced > without an agg

Re: HELP! sql command question for mysql

2005-08-11 Thread Michael Stassen
Scott Noyes wrote: It appears that you don't need to specify in the Group By clause all the columns that are referenced without an aggregate function True. For example this query would be invalid in MSSQL but valid in MySQL: select id, vendor, sum(price) from p group by id In this cas

Re: HELP! sql command question for mysql

2005-08-11 Thread Scott Noyes
> It appears that you don't need to > specify in the Group By clause all the columns that are referenced without > an aggregate function True. > For example this query would be invalid in MSSQL but > valid in MySQL: > > select id, vendor, sum(price) > from p > group by id In this case, `vendor

RE: HELP! sql command question for mysql

2005-08-11 Thread Ben Smith
id, vendor Each query giving a different result. Regards Ben. -Original Message- From: Gleb Paharenko [mailto:[EMAIL PROTECTED] Sent: 10 August 2005 23:29 To: mysql@lists.mysql.com Subject: Re: HELP! sql command question for mysql Hello. I'm not sure about the speed of this quer

Re: HELP! sql command question for mysql

2005-08-11 Thread Gleb Paharenko
Hello. I'm not sure about the speed of this query, but it seems to work: mysql> source g.sql +---+---++ | id| price | vendor | +---+---++ | OG012 |20 | b | | OG013 |40 | c | +---+---++ [EMAIL PROTECTED] mysql-deb