コンテストの制限時間が終了しました。
以降も提出を行うことができますが、順位集計には反映されません。
以降も提出を行うことができますが、順位集計には反映されません。
ソースコード
WITH Y AS (
SELECT AGE_CODE, TIME_CODE, SUM(TARGET_POP) AS POP
FROM SLEEP_TIME_DTL
GROUP BY AGE_CODE, TIME_CODE
)
SELECT
AGE_NAME AS 年齢階層
, Y120.POP AS '5時間未満'
, Y130.POP AS '5時間以上6時間未満'
, Y140.POP AS '6時間以上7時間未満'
, Y150.POP AS '7時間以上8時間未満'
, Y160.POP AS '8時間以上9時間未満'
, Y170.POP AS '9時間以上'
, Y180.POP AS '不詳'
FROM AGE_GRP AS X
LEFT OUTER JOIN Y AS Y120 ON X.AGE_CODE = Y120.AGE_CODE AND Y120.TIME_CODE = 120
LEFT OUTER JOIN Y AS Y130 ON X.AGE_CODE = Y130.AGE_CODE AND Y130.TIME_CODE = 130
LEFT OUTER JOIN Y AS Y140 ON X.AGE_CODE = Y140.AGE_CODE AND Y140.TIME_CODE = 140
LEFT OUTER JOIN Y AS Y150 ON X.AGE_CODE = Y150.AGE_CODE AND Y150.TIME_CODE = 150
LEFT OUTER JOIN Y AS Y160 ON X.AGE_CODE = Y160.AGE_CODE AND Y160.TIME_CODE = 160
LEFT OUTER JOIN Y AS Y170 ON X.AGE_CODE = Y170.AGE_CODE AND Y170.TIME_CODE = 170
LEFT OUTER JOIN Y AS Y180 ON X.AGE_CODE = Y180.AGE_CODE AND Y180.TIME_CODE = 180
ORDER BY X.AGE_CODE;
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
79 MB
データパターン2
WA
78 MB