SELECT COUNT(*)
FROM table_name
WHERE strftime('%Y', date_column) = '2022';
SELECT SUM(amount)
FROM table_name
WHERE strftime('%m', date_column) = '01';
SELECT *
FROM table_name
WHERE strftime('%Y-%m-%d', date_column) = '2022-01-01';
SELECT AVG(amount)
FROM table_name
WHERE strftime('%H', date_column) >= 12;
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: SQL中concat怎样处理不同类型