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 <value expression primary> ::= ... | <scalar subquery> | ... 7.11 <scalar subquery> ::= <subquery> <subquery> ::= <left paren> <query expression> <right paren> -- Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

