As in title, my script works on my Windows machine but doesn't work on my Ubuntu server. It can't process my SQL command:
import sqlite3
conn = sqlite3.connect('data.db')
c = conn.cursor()
c.execute("""
select distinct user_id
from
( select *,
count(1) over (partition by user_log) as occurs
from rank2_log
) AS id
where occurs > 2; """)
Error:
File "/root/Log/log.py", line 91, in check_all
14|log | where occurs > 2;""")
14|log | sqlite3.OperationalError: near "(": syntax error
I checked SQLite module versions and they're the same ( 2. 6 .0 ). Also tried to change it to normal comment from multi line for some reason but that doesn't work either.