Re: [sqlite] special aggregate feature vs query optimization

2013-01-10 Thread Igor Tandetnik
On 1/10/2013 12:04 PM, Eduardo Morras wrote: Select max(x), y from t will return 2 colums and n rows Not true. The query uses an aggregate function, so it will return one row per group. There's no GROUP BY clause, so the whole table is one group. Ergo, this query will always return exactly on

Re: [sqlite] special aggregate feature vs query optimization

2013-01-10 Thread Simon Slavin
On 10 Jan 2013, at 5:39pm, Simon Davies wrote: > SQLite version 3.7.11 2012-03-20 11:35:50 Your test is good but the way this worked changed recently. Can you download an up-to-date version of the shell tool from and try on that version ? Simon. _

Re: [sqlite] special aggregate feature vs query optimization

2013-01-10 Thread Simon Davies
On 10 January 2013 17:04, Eduardo Morras wrote: > On Thu, 10 Jan 2013 14:53:52 +0100 > E.Pasma wrote: > >> Hello, >> >> A query of the form: "SELECT max(x), y FROM table" returns the value >> of y on the same row that contains the maximum x value. > > True > >> I just want to point to a construct

Re: [sqlite] special aggregate feature vs query optimization

2013-01-10 Thread Eduardo Morras
On Thu, 10 Jan 2013 14:53:52 +0100 E.Pasma wrote: > Hello, > > this mail is about the aggregate feature that was unveiled in the > release log of version 3.17.11, http://www.sqlite.org/releaselog/3_7_11.html > : > > A query of the form: "SELECT max(x), y FROM table" returns the value > o

[sqlite] special aggregate feature vs query optimization

2013-01-10 Thread E . Pasma
Hello, this mail is about the aggregate feature that was unveiled in the release log of version 3.17.11, http://www.sqlite.org/releaselog/3_7_11.html : A query of the form: "SELECT max(x), y FROM table" returns the value of y on the same row that contains the maximum x value. I just wan