コンテストの制限時間が終了しました。
以降も提出を行うことができますが、順位集計には反映されません。
以降も提出を行うことができますが、順位集計には反映されません。
ソースコード
with x as (
SELECT
distinct
TIME_CODE
,age_code
,sum(TARGET_POP) over (partition by time_code,age_code) as total
from
SLEEP_TIME_DTL
)
SELECT
AGE_NAME as 年齢階層
,(select total from x t2 where t1.AGE_CODE = t2.AGE_CODE and TIME_CODE = 120) as "5時間未満"
,(select total from x t2 where t1.AGE_CODE = t2.AGE_CODE and TIME_CODE = 130) as "5時間以上6時間未満"
,(select total from x t2 where t1.AGE_CODE = t2.AGE_CODE and TIME_CODE = 140) as "6時間以上7時間未満"
,(select total from x t2 where t1.AGE_CODE = t2.AGE_CODE and TIME_CODE = 150) as "7時間以上8時間未満"
,(select total from x t2 where t1.AGE_CODE = t2.AGE_CODE and TIME_CODE = 160) as "8時間以上9時間未満"
,(select total from x t2 where t1.AGE_CODE = t2.AGE_CODE and TIME_CODE = 170) as "9時間以上"
,(select total from x t2 where t1.AGE_CODE = t2.AGE_CODE and TIME_CODE = 180) as "不詳"
FROM
AGE_GRP t1
where
t1.AGE_CODE IN (select distinct AGE_CODE FROM SLEEP_TIME_DTL)
ORDER BY age_code asc
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
79 MB
データパターン2
AC
77 MB