ソースコード
SELECT AGE_GRP.AGE_NAME AS "年齢階層",
(select SUM(a_grp.TARGET_POP) from SLEEP_TIME_DTL AS a_grp where AGE_GRP.AGE_CODE = a_grp.AGE_CODE and  a_grp.TIME_CODE = 120) AS "5時間未満",
(select SUM(c_grp.TARGET_POP) from SLEEP_TIME_DTL AS c_grp where AGE_GRP.AGE_CODE = c_grp.AGE_CODE and  c_grp.TIME_CODE = 130) AS "5時間以上6時間未満",
(select SUM(d_grp.TARGET_POP) from SLEEP_TIME_DTL AS d_grp where AGE_GRP.AGE_CODE = d_grp.AGE_CODE and  d_grp.TIME_CODE = 140) AS "6時間以上7時間未満",
(select SUM(e_grp.TARGET_POP) from SLEEP_TIME_DTL AS e_grp where AGE_GRP.AGE_CODE = e_grp.AGE_CODE and  e_grp.TIME_CODE = 150) AS "7時間以上8時間未満",
(select SUM(f_grp.TARGET_POP) from SLEEP_TIME_DTL AS f_grp where AGE_GRP.AGE_CODE = f_grp.AGE_CODE and  f_grp.TIME_CODE = 160) AS "8時間以上9時間未満",
(select SUM(g_grp.TARGET_POP) from SLEEP_TIME_DTL AS g_grp where AGE_GRP.AGE_CODE = g_grp.AGE_CODE and  g_grp.TIME_CODE = 170) AS "9時間以上",
(select SUM(h_grp.TARGET_POP) from SLEEP_TIME_DTL AS h_grp where AGE_GRP.AGE_CODE = h_grp.AGE_CODE and  h_grp.TIME_CODE = 180) AS "不詳"
FROM AGE_GRP
inner join SLEEP_TIME_DTL AS b_grp on
b_grp.AGE_CODE = AGE_GRP.AGE_CODE
inner join SLEEP_TIME on
SLEEP_TIME.TIME_CODE = b_grp.TIME_CODE
WHERE AGE_GRP.AGE_CODE >= 2
AND AGE_GRP.AGE_CODE <= 6 
GROUP BY AGE_GRP.AGE_CODE
提出情報
提出日時2023/02/12 21:26:57
コンテスト練習用コンテスト
問題年齢別睡眠時間分析
受験者data_analizer
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量80 MB
メッセージ
テストケース(通過数/総数)
1/2
状態
メモリ使用量
データパターン1
WA
80 MB
データパターン2
AC
77 MB