ソースコード
SELECT
    BF.CODE AS 都道府県コード,
    BF.NAME AS 都道府県名,
    BF.AMT AS 総人口2015年,
    AF.AMT AS 総人口2020年,
    ROUND (CAST (AF.AMT AS REAL) / CAST (BF.AMT AS REAL) * 100, 0)  AS 人口増加率
        FROM
            (SELECT
                POP.SURVEY_YEAR AS YERE,
                PF.PF_CODE AS CODE,
                PF.PF_NAME AS NAME,
                POP.TOTAL_AMT AS AMT
                    FROM  POPU_TRANSITION AS POP
                    JOIN PREFECTURE AS PF
                        ON POP.PF_CODE = PF.PF_CODE
                    WHERE POP.SURVEY_YEAR = 2015
            ) AS BF
        JOIN
            (SELECT
                POP.SURVEY_YEAR AS YERE,
                PF.PF_CODE AS CODE,
                PF.PF_NAME AS NAME,
                POP.TOTAL_AMT AS AMT
                    FROM  POPU_TRANSITION AS POP
                    JOIN PREFECTURE AS PF
                        ON POP.PF_CODE = PF.PF_CODE
                    WHERE POP.SURVEY_YEAR = 2020
            ) AS AF
            ON BF.CODE = AF.CODE
        WHERE BF.AMT < AF.AMT
        ORDER BY
            人口増加率 DESC,
            都道府県コード
提出情報
提出日時2023/01/25 15:13:44
コンテスト練習用コンテスト
問題人口増加率分析
受験者HerrenMoral
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量92 MB
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
78 MB
データパターン2
AC
92 MB