ソースコード
SELECT AGE_NAME '年齢階層', 
(SELECT SUM(TARGET_POP)
FROM SLEEP_TIME_DTL std
WHERE AGE_CODE = a.AGE_CODE AND TIME_CODE = 120
GROUP BY TIME_CODE) '5時間未満',
(SELECT SUM(TARGET_POP)
FROM SLEEP_TIME_DTL std
WHERE AGE_CODE = a.AGE_CODE AND TIME_CODE = 130
GROUP BY TIME_CODE) '5時間以上6時間未満満',
(SELECT SUM(TARGET_POP)
FROM SLEEP_TIME_DTL std
WHERE AGE_CODE = a.AGE_CODE AND TIME_CODE = 140
GROUP BY TIME_CODE) '6時間以上7時間未満',
(SELECT SUM(TARGET_POP)
FROM SLEEP_TIME_DTL std
WHERE AGE_CODE = a.AGE_CODE AND TIME_CODE = 150
GROUP BY TIME_CODE) '7時間以上8時間未満',
(SELECT SUM(TARGET_POP)
FROM SLEEP_TIME_DTL std
WHERE AGE_CODE = a.AGE_CODE AND TIME_CODE = 160
GROUP BY TIME_CODE) '8時間以上9時間未満',
(SELECT SUM(TARGET_POP)
FROM SLEEP_TIME_DTL std
WHERE AGE_CODE = a.AGE_CODE AND TIME_CODE = 170
GROUP BY TIME_CODE) '9時間以上',
(SELECT SUM(TARGET_POP)
FROM SLEEP_TIME_DTL std
WHERE AGE_CODE = a.AGE_CODE AND TIME_CODE = 180
GROUP BY TIME_CODE) '不詳'

FROM AGE_GRP a 

WHERE AGE_CODE IN (SELECT DISTINCT AGE_CODE FROM SLEEP_TIME_DTL)

ORDER BY AGE_CODE
提出情報
提出日時2022/07/07 01:32:49
コンテスト練習用コンテスト
問題年齢別睡眠時間分析
受験者cashew
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量78 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
78 MB
データパターン2
WA
78 MB