Hello welcome to Yzone.net

sqlite 查询sql记录

按时间归档文章统计

select count(id) as num, strftime('%Y-%m', createTime, 'unixepoch') as t  from mder_contents group by t order by t desc;
-- 也可以使用
-- select count(id) as num, strftime('%Y-%m', date(createTime, 'unixepoch')) as t from mder_contents group by t order by t desc limit 10

分类 sqlite    标签 database , sqlite
文档结构