【发布时间】:2021-03-21 09:38:27
【问题描述】:
数据库如下:
我想要得到的输出是:
我的sql查询是这样的,得到的输出是这样的。
SELECT score as "0-25" , COUNT(*) FROM Gamer WHERE (score > 0 and score<25)
UNION
SELECT score as "26-50", COUNT(*) FROM Gamer WHERE (score > 26 and score<50)
UNION
SELECT score as "51-75", COUNT(*) FROM Gamer WHERE (score > 51 and score<75)
UNION
SELECT score as "76-100", COUNT(*) FROM Gamer WHERE (score > 76 and score<=100)
【问题讨论】:
-
您有问题吗?