PostgreSQL怎么取近两年来每个季度的数
TO_CHAR( DATA_DATE, 'YYYY' ) , TO_CHAR( DATA_DATE, 'Q' )
SELECT COUNT(*),QUARTER(CreateTime) FROM t_voipchannelrecord WHERE YEAR(CreateTime) = '2016' GROUP BY QUARTER(CreateTime)