You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dsMin/BigDataSql/第一页/办学条件情况(按城乡类型).sql

11 lines
473 B

select t1.stage,t1.citycountrygroup,zhandimianjino,t2.zaixiaono as studentno from mv_db_base_banxuetiaojian as t1
inner join mv_db_base_student as t2 on t1.stage=t2.stage and t1.citycountrygroup=t2.citycountrygroup
order by
(case when t1.stage='小学' then 1
when t1.stage='初中' then 2
when t1.stage='高中' then 3
end),
(case when t1.citycountrygroup='城区' then 1
when t1.citycountrygroup='镇区' then 2
when t1.citycountrygroup='乡村' then 3
end)