|
ÿÄê select to_char(createtime, 'YYYY') Äê, count(*) from table group by to_char(createtime, 'YYYY'); ÿ¼¾¶È select to_char(createtime, 'q') Äê, count(*) from table group by to_char(createtime, 'q'); ÿÔ select to_char(createtime, 'YYYY') Äê, to_char(createtime, 'mm') ÔÂ, count(*) from table group by to_char(createtime, 'YYYY'), to_char(createtime, 'mm'); ÿÈÕ select to_char(createtime, 'YYYY') Äê,to_char(createtime, 'mm') ÔÂ,to_char(createtime, 'dd') ÈÕ, count(*) from table group by to_char(createtime, 'YYYY'), to_char(createtime, 'mm'),to_char(createtime, 'dd'); ÆäÖÐcreatetimeΪdateÀàÐÍ£¬Èç¹ûΪvarcharÏÈҪת»»ÎªdateÀàÐÍ
|