SQLite3 有date_sub函数吗? 没有的话用什么替代。
SELECT
UID,
date_sub(date1,sort) as login_group,
min(date1) as start_date1,
max(date1) as end_date1,
count(1) as continuous_days
FROM (
SELECT
UID,
date1,
row_number() OVER(PARTITION BY UID order by date1) as sort
FROM user_login
) a
GROUP BY UID,date_sub(date1,sort)
帮忙用SQLite3重写下SQL语句。