SQLite Forum

SELECT with LIMIT OFFSET clause return unexpected result (with sample db and query)
Login
Simplified test case:

> ~~~
CREATE TABLE t1(x);
INSERT INTO t1 VALUES(1),(1),(1);
SELECT (SELECT DISTINCT x FROM t1 ORDER BY +x LIMIT 1 OFFSET 100) FROM t1;
~~~

This returns three 1's, but ought to return three NULLs, I think.