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
ORDER BY after a parenthesised part with its own LIMIT sorts only the rows of the first part #3134
alasql('CREATE TABLE A (a INT); INSERT INTO A VALUES (3),(1),(2)');alasql('CREATE TABLE B (a INT); INSERT INTO B VALUES (9),(8),(7)');alasql('SELECT COLUMN a FROM A UNION ALL (SELECT a FROM B ORDER BY a LIMIT 2) ORDER BY a DESC');
It gives [3, 2, 1, 7, 8].
SQLite gives 8, 7, 3, 2, 1 (with the part written as SELECT * FROM (...)).
Activity