Re: [sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Will Leshner
On Aug 11, 2005, at 10:48 AM, Vladimir Zelinski wrote: Sqlite does return some kind of result for incorrect SQL queries. I consider that this is a non-critical bug that should be fixed in future I think I might submit this as a bug, then. Thanks.

Re: [sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Will Leshner
On Aug 11, 2005, at 10:19 AM, [EMAIL PROTECTED] wrote: In any case, there's no defined way to determine *which* row the non-group data will be returned from, so at best, it's an unreliable query. I was kind of hoping it might be a "compile"-time error. That seems to be what MySQL is doing

Re: [sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Will Leshner
On Aug 11, 2005, at 10:19 AM, [EMAIL PROTECTED] wrote: This must be typo. You probably mean that you get back 3|3. Oops. That's right. That's what I get for typing it in by hand :)

Re: [sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Vladimir Zelinski
I noticed this strange behavior on Sqlite since I started using it. This kind of SQL is not correct and normally any DB should return an error. For example, Oracle would return this error: "ORA-00937: not a single-group group function". Sqlite does return some kind of result for incorrect SQL queri

Re: [sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Scott Baker
I would certainly think the way MySQL treats this is correct. SQLite may be trying to assume what you meant, and interpreting. Which may confuse the client if they don't know what they're asking. Will Leshner wrote: Say I have a table defined and populated as follows: CREATE TABLE test (a TEX

Re: [sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Derrell . Lipman
Will Leshner <[EMAIL PROTECTED]> writes: > Say I have a table defined and populated as follows: > > CREATE TABLE test (a TEXT); > INSERT INTO test (a) VALUES ('hello'); > INSERT INTO test (a) VALUES ('hello'); > INSERT INTO test (a) VALUES ('hello'); > > And I perform the following query: > > SELE

[sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Will Leshner
Say I have a table defined and populated as follows: CREATE TABLE test (a TEXT); INSERT INTO test (a) VALUES ('hello'); INSERT INTO test (a) VALUES ('hello'); INSERT INTO test (a) VALUES ('hello'); And I perform the following query: SELECT rowid,count(a) FROM test In SQLite I get back: 3|hell