我有一个如下所示的SQL查询:
select age_group, sum(member_count), sum(discharge_count)
from newtable
group by age_group
order by age_group;
它返回以下结果:
age_group | member_count | discharge_count |
---|---|---|
18-64 Years | 150 | 245 |
6-17 Years | 185 | 325 |
65 and Above Years | 125 | 230 |
但我想要这样的结果:
age_group | member_count | discharge_count |
---|---|---|
6-17 Years | 185 | 325 |
18-64 Years | 150 | 245 |
65 and Above Years | 125 | 230 |