Your inner query only deals with what I've left in the quote below. Z doesn't exist to the inner query.
On Sun, Dec 18, 2016 at 8:57 AM, Keith Maxwell <keith.maxw...@gmail.com> wrote: > I've read the documentation[1] a few times and I don't understand why I > get: > CREATE TABLE t1(x INTEGER, y INTEGER); > SELECT (SELECT y FROM t1 ORDER BY abs(x - z) LIMIT 1) FROM t2; > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users