コンテストの制限時間が終了しました。
以降も提出を行うことができますが、順位集計には反映されません。
以降も提出を行うことができますが、順位集計には反映されません。
ソースコード
SELECT
AGE_GRP.AGE_NAME AS `年齢階層`,
SUM(SLEEP_TIME_120.TARGET_POP) AS `5時間未満`,
SUM(SLEEP_TIME_130.TARGET_POP) AS `5時間以上6時間未満`,
SUM(SLEEP_TIME_140.TARGET_POP) AS `6時間以上7時間未満`,
SUM(SLEEP_TIME_150.TARGET_POP) AS `7時間以上8時間未満`,
SUM(SLEEP_TIME_160.TARGET_POP) AS `8時間以上9時間未満`,
SUM(SLEEP_TIME_170.TARGET_POP) AS `9時間以上`,
SUM(SLEEP_TIME_180.TARGET_POP) AS `不詳`
FROM
AGE_GRP
INNER JOIN
(SELECT AGE_CODE, SUM(TARGET_POP) AS TARGET_POP FROM SLEEP_TIME_DTL WHERE TIME_CODE = 120 GROUP BY AGE_CODE) AS
SLEEP_TIME_120 ON
SLEEP_TIME_120.AGE_CODE = AGE_GRP.AGE_CODE
INNER JOIN
(SELECT AGE_CODE, SUM(TARGET_POP) AS TARGET_POP FROM SLEEP_TIME_DTL WHERE TIME_CODE = 130 GROUP BY AGE_CODE) AS
SLEEP_TIME_130 ON
SLEEP_TIME_130.AGE_CODE = AGE_GRP.AGE_CODE
INNER JOIN
(SELECT AGE_CODE, SUM(TARGET_POP) AS TARGET_POP FROM SLEEP_TIME_DTL WHERE TIME_CODE = 140 GROUP BY AGE_CODE) AS
SLEEP_TIME_140 ON
SLEEP_TIME_140.AGE_CODE = AGE_GRP.AGE_CODE
INNER JOIN
(SELECT AGE_CODE, SUM(TARGET_POP) AS TARGET_POP FROM SLEEP_TIME_DTL WHERE TIME_CODE = 150 GROUP BY AGE_CODE) AS
SLEEP_TIME_150 ON
SLEEP_TIME_150.AGE_CODE = AGE_GRP.AGE_CODE
INNER JOIN
(SELECT AGE_CODE, SUM(TARGET_POP) AS TARGET_POP FROM SLEEP_TIME_DTL WHERE TIME_CODE = 160 GROUP BY AGE_CODE) AS
SLEEP_TIME_160 ON
SLEEP_TIME_160.AGE_CODE = AGE_GRP.AGE_CODE
INNER JOIN
(SELECT AGE_CODE, SUM(TARGET_POP) AS TARGET_POP FROM SLEEP_TIME_DTL WHERE TIME_CODE = 170 GROUP BY AGE_CODE) AS
SLEEP_TIME_170 ON
SLEEP_TIME_170.AGE_CODE = AGE_GRP.AGE_CODE
INNER JOIN
(SELECT AGE_CODE, SUM(TARGET_POP) AS TARGET_POP FROM SLEEP_TIME_DTL WHERE TIME_CODE = 180 GROUP BY AGE_CODE) AS
SLEEP_TIME_180 ON
SLEEP_TIME_180.AGE_CODE = AGE_GRP.AGE_CODE
GROUP BY
AGE_GRP.AGE_CODE
ORDER BY
AGE_GRP.AGE_CODE
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
103 MB
データパターン2
AC
100 MB