SQLite3 有date_sub函数吗?

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语句。

julianday
https://www.cnblogs.com/netlyf/p/4682095.html

select strftime('%Y%m%d %H:%M:%S','now','localtime') 要截取哪个输入哪个
select strftime(‘%Y%m’,日期)