Hi, for computing the median of a group, it would be useful to be able to use a correlated subquery as the expression in a OFFSET clause.
However, it appears that SQLite does not allow correlated subqueries in the LIMIT/OFFSET clauses of a scalar subquery: sqlite> create table t(x); sqlite> select (select 42 limit 1 offset (select t.x)) from t; Error: no such column: t.x Is this behaviour by design? The documentation says that the LIMIT clause of a scalar subquery is ignored and gets replaced with 1, but this shouldn't disallow the syntax above, and should not apply to the OFFSET value in any case. Regards, Clemens _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

