コンテストの制限時間が終了しました。
以降も提出を行うことができますが、順位集計には反映されません。
以降も提出を行うことができますが、順位集計には反映されません。
ソースコード
select
"2022" as "SV_YEAR"
,p.pf_name as "PREFECTURE"
,eall.KIND as "KIND"
,eall.AMT as "AMT"
from
(
select
e.pf_code
, "小学校" as "KIND"
, 1 as no
,sum(e.elementary) as "AMT"
from ENROLLMENT_STATUS e
where e.survey_year=2020
and e.elementary is not null
group by e.pf_code
union all
select
e.pf_code
, "中学校" as "KIND"
, 2 as no
,sum(e.middle) as "AMT"
from ENROLLMENT_STATUS e
where e.survey_year=2020
and e.middle is not null
group by e.pf_code
union all
select
e.pf_code
, "高校" as "KIND"
, 3 as no
,sum(e.high) as "AMT"
from ENROLLMENT_STATUS e
where e.survey_year=2020
and e.high is not null
group by e.pf_code
union all
select
e.pf_code
, "短大" as "KIND"
, 4 as no
,sum(e.junior_clg) as "AMT"
from ENROLLMENT_STATUS e
where e.survey_year=2020
and e.junior_clg is not null
group by e.pf_code
union all
select
e.pf_code
, "大学" as "KIND"
, 5 as no
,sum(e.college) as "AMT"
from ENROLLMENT_STATUS e
where e.survey_year=2020
and e.college is not null
group by e.pf_code
union all
select
e.pf_code
, "大学院" as "KIND"
, 6 as no
,sum(e.graduate) as "AMT"
from ENROLLMENT_STATUS e
where e.survey_year=2020
and e.graduate is not null
group by e.pf_code
) eall
,prefecture p
where eall.pf_code=p.pf_code
order by p.pf_code,eall.no
提出情報
提出日時 | 2022/09/22 08:42:07 |
コンテスト | 第2回 SQLコンテスト |
問題 | 就学状況の表示変換 |
受験者 | red3 |
状態 (詳細) | WA (Wrong Answer: 誤答) |
メモリ使用量 | 95 MB |
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
95 MB
データパターン2
WA
95 MB