You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A scalar or IN subquery anywhere in a WITH statement throws a TypeError #3132
alasql('CREATE TABLE t (id INT); INSERT INTO t VALUES (1),(2),(3)');alasql('CREATE TABLE z (zn INT); INSERT INTO z VALUES (5),(2)');alasql('WITH c AS (SELECT id FROM t) SELECT id, (SELECT MAX(zn) FROM z) AS m FROM c');alasql('WITH c AS (SELECT id, (SELECT MAX(zn) FROM z) AS m FROM t) SELECT * FROM c');alasql('WITH c AS (SELECT id FROM t) SELECT id FROM c WHERE id IN (SELECT zn FROM z)');
Each of the three queries throws TypeError: Cannot read properties of undefined (reading '0').
SQLite gives (1, 5), (2, 5), (3, 5) for the first two and 2 for the third.
Activity