コンテストの制限時間が終了しました。
以降も提出を行うことができますが、順位集計には反映されません。
以降も提出を行うことができますが、順位集計には反映されません。
ソースコード
with base as (
select SURVEY_YEAR,
PF_CODE,
"小学校" as KIND,
total(ELEMENTARY) AMT,
0 as ord
from ENROLLMENT_STATUS
where SURVEY_YEAR = 2020
group by SURVEY_YEAR,
PF_CODE
UNION all
select SURVEY_YEAR,
PF_CODE,
"中学校" as KIND,
total(MIDDLE) AMT,
1 as ord
from ENROLLMENT_STATUS
where SURVEY_YEAR = 2020
group by SURVEY_YEAR,
PF_CODE
UNION all
select SURVEY_YEAR,
PF_CODE,
"高校" as KIND,
total(HIGH) AMT,
2 as ord
from ENROLLMENT_STATUS
where SURVEY_YEAR = 2020
group by SURVEY_YEAR,
PF_CODE
UNION all
select SURVEY_YEAR,
PF_CODE,
"短大" as KIND,
total(JUNIOR_CLG) AMT,
3 as ord
from ENROLLMENT_STATUS
where SURVEY_YEAR = 2020
group by SURVEY_YEAR,
PF_CODE
UNION all
select SURVEY_YEAR,
PF_CODE,
"大学" as KIND,
total(COLLEGE) AMT,
4 as ord
from ENROLLMENT_STATUS
where SURVEY_YEAR = 2020
group by SURVEY_YEAR,
PF_CODE
UNION all
select SURVEY_YEAR,
PF_CODE,
"大学院" as KIND,
total(GRADUATE) AMT,
5 as ord
from ENROLLMENT_STATUS
where SURVEY_YEAR = 2020
group by SURVEY_YEAR,
PF_CODE
)
select
SURVEY_YEAR as SV_YEAR,
PF_NAME as PREFECTURE,
KIND,
AMT
from base b
inner join PREFECTURE p on p.pf_code = b.pf_code
order by b.PF_CODE, b.ord
提出情報
提出日時 | 2022/09/21 21:44:49 |
コンテスト | 第2回 SQLコンテスト |
問題 | 就学状況の表示変換 |
受験者 | hiraku |
状態 (詳細) | WA (Wrong Answer: 誤答) |
メモリ使用量 | 101 MB |
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
98 MB
データパターン2
WA
101 MB