2

For eliminate other causes, I copy from www.sqlite.org/windowfunctions.html that codes and pasted:

CREATE TABLE t0(x INTEGER PRIMARY KEY, y TEXT);
INSERT INTO t0 VALUES (1, 'aaa'), (2, 'ccc'), (3, 'bbb');

SELECT x, y, row_number() OVER (ORDER BY y) AS row_number FROM t0 ORDER BY x;

Still I have same error:

near "(": syntax error: SELECT x, y, row_number() OVER (.

I use Python 3.7 and sqlite 3. Help please!

khelwood
  • 55,782
  • 14
  • 81
  • 108
  • 2
    Your query is correct so you probably not use SQLite 3.25 or above. [Window functions were introduced in 3.25](https://www.sqlite.org/releaselog/3_25_0.html) and you'll get that error with that query in all previous versions. – Thomas G Jan 04 '19 at 10:17

0 Answers0