81,091
社区成员
发帖
与我相关
我的任务
分享
SELECT month,CAST(SUM(Profit)as decimal(10,2)) FROM project GROUP BY month ORDER BY month ASC
查询每个月利润的分组排行 分组用group by
select
case
when mydate >= "2017-05" and mydata < "2017-06" then "5~6月"
when ******
else null
end groupDate, count(*)
from test_table
group by
case
when mydate >= "2017-05" and mydata < "2017-06" then "5~6月"
when ******
else null
end;