改一下字段和表名 试试行不行行
select
t1.aa,t1.地点,
count(礼品)over(partition by aa,地点 ) as cnt
from
(
select t.*,
case when t.FSCORE>=1 and t.FSCORE<49.9 then '1-49.9'
when t.FSCORE>=50 and t.FSCORE<99.9 then '50-99.9'
when t.FSCORE>=100 and t.FSCORE<149.9 then '100-149.9'
else '' end aa
from table t ) t1
group by t1.aa,t1.地点