ソースコード
SELECT	pt.PF_CODE, pr.PF_NAME,
        (SELECT TOTAL_AMT FROM POPU_TRANSITION AS pt1 WHERE SURVEY_YEAR = 2015 AND pt1.PF_CODE = pt.PF_CODE) AS 総人口2015年,
        (SELECT TOTAL_AMT FROM POPU_TRANSITION AS pt2 WHERE SURVEY_YEAR = 2020 AND pt2.PF_CODE = pt.PF_CODE) AS 総人口2020年,
        round(cast((SELECT TOTAL_AMT FROM POPU_TRANSITION AS pt1 WHERE SURVEY_YEAR = 2020 AND pt1.PF_CODE = pt.PF_CODE) AS double) / 
        (SELECT TOTAL_AMT FROM POPU_TRANSITION AS pt1 WHERE SURVEY_YEAR = 2015 AND pt1.PF_CODE = pt.PF_CODE) * 100) AS 人口増加率
FROM	POPU_TRANSITION AS pt
JOIN    PREFECTURE AS pr
ON      pt.PF_CODE = pr.PF_CODE
GROUP BY  pt.PF_CODE
HAVING  (SELECT TOTAL_AMT FROM POPU_TRANSITION AS pt1 WHERE SURVEY_YEAR = 2015 AND pt1.PF_CODE = pt.PF_CODE) <
        (SELECT TOTAL_AMT FROM POPU_TRANSITION AS pt1 WHERE SURVEY_YEAR = 2020 AND pt1.PF_CODE = pt.PF_CODE)
ORDER BY 5 DESC, 1
提出情報
提出日時2023/07/24 16:12:13
コンテスト練習用コンテスト
問題人口増加率分析
受験者Incompetence
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量85 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
85 MB
データパターン2
WA
83 MB