Re: [sqlite] Seems like a bug in the parser

2006-08-25 Thread Alexei Alexandrov
On 8/23/06, Andrew McCollum <[EMAIL PROTECTED]> wrote: I find this feature useful, especially in queries which use aggregate functions, such as the following: SELECT sum(a) FROM tbl GROUP BY b The question should be what the compelling reason is to remove a useful feature. Of course it's OK

Re: [sqlite] Seems like a bug in the parser

2006-08-24 Thread Jay Sprenkle
> The question should be what the compelling reason is to remove a useful > feature. ... And *that* is exactly why Windows will always be full of security holes. I thought it was because it used the network for inter process communications (thus allowing external processes to attack it) --

Re: [sqlite] Seems like a bug in the parser

2006-08-23 Thread Joe Wilson
--- Kurt Welgehausen <[EMAIL PROTECTED]> wrote: > > select a from qqq group by b; > > This question was discussed on the list a year or 2 ago. > > The column a in the simple query above is meaningless; it's > an arbitrary value from each group. There are queries, > however, where a non-grouped

Re: [sqlite] Seems like a bug in the parser

2006-08-23 Thread Jonathan Ellis
On 8/23/06, Andrew McCollum <[EMAIL PROTECTED]> wrote: I find this feature useful, especially in queries which use aggregate functions, such as the following: SELECT sum(a) FROM tbl GROUP BY b The question should be what the compelling reason is to remove a useful feature. ... And *that* is

RE: [sqlite] Seems like a bug in the parser

2006-08-23 Thread Andrew McCollum
[mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 7:02 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Seems like a bug in the parser > select a from qqq group by b; This question was discussed on the list a year or 2 ago. The column a in the simple query above is meaningl

Re: [sqlite] Seems like a bug in the parser

2006-08-23 Thread Kurt Welgehausen
> select a from qqq group by b; This question was discussed on the list a year or 2 ago. The column a in the simple query above is meaningless; it's an arbitrary value from each group. There are queries, however, where a non-grouped column is meaningful, such as a join where the grouping column

Re: [sqlite] Seems like a bug in the parser

2006-08-23 Thread Mario Frasca
Joe Wilson wrote: --- [EMAIL PROTECTED] wrote: SQLite accepts the above and does the right thing with it. It is the equivalent of saying: SELECT a FROM (SELECT a,b FROM qqq GROUP BY b); Not sure what you mean by the "right thing". It's not obvious why the rows returned by this GROUP BY

Re: [sqlite] Seems like a bug in the parser

2006-08-23 Thread Alexei Alexandrov
On 8/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: SQLite accepts the above and does the right thing with it. It is the equivalent of saying: SELECT a FROM (SELECT a,b FROM qqq GROUP BY b); The subquery here doesn't make any sense to me. How a single 'a' is chosen for the grouped

Re: [sqlite] Seems like a bug in the parser

2006-08-22 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > "Alexei Alexandrov" <[EMAIL PROTECTED]> wrote: > > I noticed something like a bug in the SQLite parser: queries with > > "group by" expression should accept only fields listed in the "group > > by" clause or aggregated fields (with sum(), max() etc). For example, > >

Re: [sqlite] Seems like a bug in the parser

2006-08-22 Thread drh
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote: > I noticed something like a bug in the SQLite parser: queries with > "group by" expression should accept only fields listed in the "group > by" clause or aggregated fields (with sum(), max() etc). For example, > given the table > > create table qqq