ソースコード

select 
    p.pf_code as "都道府県コード",
    pf_name as "都道府県名",
    pop_2015 as "総人口2015年",
    pop_2020 as "総人口2020年",
    round(100.0* pop_2020/pop_2015) as "人口増加率"
from 
    prefecture as p
    left join 
    (select 
        pf_code,
        total_amt as pop_2015
    from popu_transition
    where survey_year = 2015) as p1
    on p.pf_code = p1.pf_code 
    left join 
    (select 
        pf_code,
        total_amt as pop_2020
    from popu_transition
    where survey_year = 2020) as p2
    on p.pf_code = p2.pf_code
where pop_2020 > pop_2015
order by 5 desc, 1 asc 
提出情報
提出日時2022/06/29 14:47:16
コンテスト練習用コンテスト
問題人口増加率分析
受験者mk
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量77 MB
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
77 MB
データパターン2
AC
76 MB