コンテストの制限時間が終了しました。
以降も提出を行うことができますが、順位集計には反映されません。
以降も提出を行うことができますが、順位集計には反映されません。
ソースコード
SELECT
AGE_NAME AS 年齢階層,
T5.TN AS '5時間未満',
T56.TN AS '5時間以上6時間未満',
T67.TN AS '6時間以上7時間未満',
T78.TN AS '7時間以上8時間未満',
T89.TN AS '8時間以上9時間未満',
T9.TN AS '9時間以上',
UNKWON.TN AS 不詳
FROM AGE_GRP AS A
LEFT JOIN (
SELECT *, SUM(TARGET_POP) AS TN
FROM SLEEP_TIME_DTL AS STD
LEFT JOIN SLEEP_TIME AS ST ON STD.TIME_CODE = ST.TIME_CODE
WHERE STD.TIME_CODE=120
GROUP BY AGE_CODE
) AS T5 ON A.AGE_CODE = T5.AGE_CODE
LEFT JOIN (
SELECT AGE_CODE, SUM(TARGET_POP) AS TN
FROM SLEEP_TIME_DTL AS STD
LEFT JOIN SLEEP_TIME AS ST ON STD.TIME_CODE = ST.TIME_CODE
WHERE STD.TIME_CODE=130
GROUP BY AGE_CODE
) AS T56 ON A.AGE_CODE = T56.AGE_CODE
LEFT JOIN (
SELECT AGE_CODE, SUM(TARGET_POP) AS TN
FROM SLEEP_TIME_DTL AS STD
LEFT JOIN SLEEP_TIME AS ST ON STD.TIME_CODE = ST.TIME_CODE
WHERE STD.TIME_CODE=140
GROUP BY AGE_CODE
) AS T67 ON A.AGE_CODE = T67.AGE_CODE
LEFT JOIN (
SELECT AGE_CODE, SUM(TARGET_POP) AS TN
FROM SLEEP_TIME_DTL AS STD
LEFT JOIN SLEEP_TIME AS ST ON STD.TIME_CODE = ST.TIME_CODE
WHERE STD.TIME_CODE=150
GROUP BY AGE_CODE
) AS T78 ON A.AGE_CODE = T78.AGE_CODE
LEFT JOIN (
SELECT AGE_CODE, SUM(TARGET_POP) AS TN
FROM SLEEP_TIME_DTL AS STD
LEFT JOIN SLEEP_TIME AS ST ON STD.TIME_CODE = ST.TIME_CODE
WHERE STD.TIME_CODE=160
GROUP BY AGE_CODE
) AS T89 ON A.AGE_CODE = T89.AGE_CODE
LEFT JOIN (
SELECT AGE_CODE, SUM(TARGET_POP) AS TN
FROM SLEEP_TIME_DTL AS STD
LEFT JOIN SLEEP_TIME AS ST ON STD.TIME_CODE = ST.TIME_CODE
WHERE STD.TIME_CODE=170
GROUP BY AGE_CODE
) AS T9 ON A.AGE_CODE = T9.AGE_CODE
LEFT JOIN (
SELECT AGE_CODE, SUM(TARGET_POP) AS TN
FROM SLEEP_TIME_DTL AS STD
LEFT JOIN SLEEP_TIME AS ST ON STD.TIME_CODE = ST.TIME_CODE
WHERE STD.TIME_CODE=180
GROUP BY AGE_CODE
) AS UNKWON ON A.AGE_CODE = UNKWON.AGE_CODE
WHERE T5.TN IS NOT NULL
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
81 MB
データパターン2
AC
81 MB