parent
7045da3645
commit
b47f64779b
@ -1,5 +1 @@
|
||||
select t1.stage,sum(t1.zhaoshengno) as zhaoshengno,sum(t1.biyeno) as biyeno,sum(t1.zaixiaono) as zaixiaono from mv_db_base_student as t1 GROUP BY t1.stage order by
|
||||
(case when t1.stage='小学' then 1
|
||||
when t1.stage='初中' then 2
|
||||
when t1.stage='高中' then 3
|
||||
end)
|
||||
select * from (select stage,unnest(array['招生数', '在校生数', '毕业生数']) AS didgroup, unnest(array[sum(zhaoshengno) ,sum(zaixiaono),sum(biyeno)]) as total from mv_db_base_student GROUP BY stage ) t order by case when stage='小学' then 1 when stage='初中' then 2 when stage='高中' then 3 end,case when didgroup='招生数' then 1 when didgroup='在校生数' then 2 when didgroup='高中' then 3 end
|
Loading…
Reference in new issue