( select 来电时间, 问题类别 from mytable where 问题类别 = '农村用水投诉' ) tmptable
group by DATE_FORMAT(来电时间,'%Y-%m') ,问题类别 ORDER BY 月 ASC
selecttable.year,
table.month,
table.day
from
(SELECT
year(time) year,
month(time) month,
day(time) day
FROM
table) table
group by table.year,table.month,table.day
order BY table.year,table.month,table.day desc
望采纳,有疑问或是有更好写法,请多交流
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)