ソースコード
select
    PF.PF_CODE as "都道府県コード",
    PF.PF_NAME as "都道府県名",
    MIN(
        CASE
            when SURVEY_YEAR = 2015 then POP.TOTAL_AMT
        end
    ) as "総人口2015年",
    MIN(
        CASE
            when SURVEY_YEAR = 2020 then POP.TOTAL_AMT
        end
    ) as "総人口2020年",
    round(
        cast(
            MIN(
                CASE
                    when SURVEY_YEAR = 2020 then POP.TOTAL_AMT
                end
            ) as real
        ) / MIN(
            CASE
                when SURVEY_YEAR = 2015 then POP.TOTAL_AMT
            end
        ) * 100
    ) as "人口増加率"
from
    PREFECTURE as PF
    join POPU_TRANSITION as POP on PF.PF_CODE = POP.PF_CODE
    and (
        POP.SURVEY_YEAR = 2015
        or POP.SURVEY_YEAR = 2020
    )
group by
    PF.PF_CODE
having round(
        cast(
            MIN(
                CASE
                    when SURVEY_YEAR = 2020 then POP.TOTAL_AMT
                end
            ) as real
        ) / MIN(
            CASE
                when SURVEY_YEAR = 2015 then POP.TOTAL_AMT
            end
        ) * 100
    ) >= 100
order by
    "人口増加率" desc,
    "都道府県コード" asc;
提出情報
提出日時2023/11/03 02:26:34
コンテスト練習用コンテスト
問題人口増加率分析
受験者c8a
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量79 MB
メッセージ
テストケース(通過数/総数)
1/2
状態
メモリ使用量
データパターン1
WA
79 MB
データパターン2
AC
76 MB