有人有过这个经验么,试了anno跟aggr好像都有局限,
pass_num int,ratio float ,pass_bool 0,1
不包含主键,不使用raw方法
select Name,classes,sum(pass_num*pass_ratio)/sum(pass_num) as p1,sum(pass_bool)/count(pass_bool) as p2 from classes_status group by region,Name
相似问题