美文网首页
SQLite SQL查询按年、月份分组

SQLite SQL查询按年、月份分组

作者: 生命不止运动不息 | 来源:发表于2021-03-13 21:43 被阅读0次

    查询按月份分组,主要用到strftime("%Y,%m,%d",OrderDate)函数
    例:SELECT *,strftime("%Y,%m,%d",OrderDate) FROM Orders group by strftime("%Y,%m",OrderDate)

    按月分组结果 表数据

    相关文章

      网友评论

          本文标题:SQLite SQL查询按年、月份分组

          本文链接:https://www.haomeiwen.com/subject/hmhfcltx.html