SELECT
TO_CHAR(T.CREATION_TIME,'MM')TIME,COUNT(*) COUNT
FROMdatabase T
WHERE
TO_CHAR(t.CREATION_TIME,'yyyy-MM-dd hh24:mi:ss')LIKE'2020'||'%'GROUPBY
TO_CHAR(T.CREATION_TIME,'MM')ORDERBY
TO_CHAR(T.CREATION_TIME,'MM')ASC
根据CREATION_TIME字段前缀在2020年的数据查询每个月的统计量,SELECT TO_CHAR(T.CREATION_TIME, 'MM') TIME, COUNT(*) COUNTFROM database TWHERE TO_CHAR(t.CREATION_TIME, 'yyyy-MM-dd hh24:mi:ss') LIKE '2020' || '%'GROUP BY TO_CHAR(T.CREATION_TIME, 'MM')ORDER BY TO_CHAR(T.CR