34,588
社区成员
发帖
与我相关
我的任务
分享
select t1.*,t2.pri from
(
select class,SUM(sx) sx
from a left join b on class=class_id
where b_u=1
group by class
) t1
left join
(
select c_d,SUM(pri) pri from c
where ud=1
group by c_d
) t2
on t1.class=t2.c_d