Re: [sqlite] select max(x), y from table

2013-02-04 Thread Petite Abeille
On Feb 4, 2013, at 12:47 PM, Ryan Johnson wrote: > Otherwise, it looks like you want some variant of the "windowing" and "rank" > functions, which are non-standard features of postgres: > http://www.postgresql.org/docs/9.1/static/tutorial-window.html Window

Re: [sqlite] select max(x), y from table

2013-02-04 Thread Ryan Johnson
On 03/02/2013 10:31 AM, Gabor Grothendieck wrote: On Sun, Feb 3, 2013 at 5:12 AM, E.Pasma wrote: Op 3 feb 2013, om 02:59 heeft Igor Tandetnik het volgende geschreven: On 2/2/2013 6:46 PM, Gabor Grothendieck wrote: In 3.7.11 there was a change to support the feature in

Re: [sqlite] select max(x), y from table

2013-02-03 Thread Simon Slavin
On 4 Feb 2013, at 2:38am, Igor Tandetnik wrote: > On 2/3/2013 1:58 PM, Simon Slavin wrote: >>> SELECT * FROM t WHERE x = (SELECT MAX (x) FROM t t2 WHERE t2.y = t.y) >> >> Your query is not standard SQL92. SQL92 does not allow SELECT commands as >> part of expressions.

Re: [sqlite] select max(x), y from table

2013-02-03 Thread Igor Tandetnik
On 2/3/2013 1:58 PM, Simon Slavin wrote: SELECT * FROM t WHERE x = (SELECT MAX (x) FROM t t2 WHERE t2.y = t.y) Your query is not standard SQL92. SQL92 does not allow SELECT commands as part of expressions. Does too: http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt 6.11

Re: [sqlite] select max(x), y from table

2013-02-03 Thread E.Pasma
Op 3 feb 2013, om 22:06 heeft Gabor Grothendieck het volgende geschreven: On Sun, Feb 3, 2013 at 4:00 PM, Petite Abeille wrote: On Feb 3, 2013, at 9:54 PM, Gabor Grothendieck wrote: What is the SQLite consortium?

Re: [sqlite] select max(x), y from table

2013-02-03 Thread Petite Abeille
On Feb 3, 2013, at 9:54 PM, Gabor Grothendieck wrote: > What is the SQLite consortium? http://www.sqlite.org/consortium.html ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] select max(x), y from table

2013-02-03 Thread E.Pasma
Op 3 feb 2013, om 20:01 heeft Gabor Grothendieck het volgende geschreven: On Sun, Feb 3, 2013 at 1:40 PM, E.Pasma wrote: Op 3 feb 2013, om 16:31 heeft Gabor Grothendieck het volgende geschreven: On Sun, Feb 3, 2013 at 5:12 AM, E.Pasma

Re: [sqlite] select max(x), y from table

2013-02-03 Thread Simon Slavin
On 3 Feb 2013, at 6:40pm, "E.Pasma" wrote: > OK, but if one does not assume any specific (non SQL standard) features, the > query is something like: > > SELECT * FROM t WHERE x = (SELECT MAX (x) FROM t t2 WHERE t2.y = t.y) Your query is not standard SQL92. SQL92

Re: [sqlite] select max(x), y from table

2013-02-03 Thread E.Pasma
Op 3 feb 2013, om 16:31 heeft Gabor Grothendieck het volgende geschreven: On Sun, Feb 3, 2013 at 5:12 AM, E.Pasma wrote: Op 3 feb 2013, om 02:59 heeft Igor Tandetnik het volgende geschreven: On 2/2/2013 6:46 PM, Gabor Grothendieck wrote: In 3.7.11 there was a

Re: [sqlite] select max(x), y from table

2013-02-03 Thread E.Pasma
Op 3 feb 2013, om 02:59 heeft Igor Tandetnik het volgende geschreven: On 2/2/2013 6:46 PM, Gabor Grothendieck wrote: In 3.7.11 there was a change to support the feature in the subject which refers to guaranteeing that y comes from the same row having maximum x.. See:

Re: [sqlite] select max(x), y from table

2013-02-02 Thread Igor Tandetnik
On 2/2/2013 6:46 PM, Gabor Grothendieck wrote: In 3.7.11 there was a change to support the feature in the subject which refers to guaranteeing that y comes from the same row having maximum x.. See: http://pages.citebite.com/o9y9n0p9neyt Did this or other change also enhance the having clause