ソースコード
select 
ag.AGE_NAME
, sub120.sum_pop as '5時間未満'
, sub130.sum_pop as '5時間以上6時間未満'
, sub140.sum_pop as '6時間以上7時間未満'
, sub150.sum_pop as '7時間以上8時間未満'
, sub160.sum_pop as '8時間以上9時間未満'
, sub170.sum_pop as '9時間以上'
, sub180.sum_pop as '不詳'
from AGE_GRP as 'ag'
inner join (select TIME_CODE, AGE_CODE, SUM(TARGET_POP) as 'sum_pop' from SLEEP_TIME_DTL group by TIME_CODE, AGE_CODE) as 'sub120' on ag.AGE_CODE = sub120.AGE_CODE and sub120.TIME_CODE = 120
inner join (select TIME_CODE, AGE_CODE, SUM(TARGET_POP) as 'sum_pop' from SLEEP_TIME_DTL group by TIME_CODE, AGE_CODE) as 'sub130' on ag.AGE_CODE = sub130.AGE_CODE and sub130.TIME_CODE = 130
inner join (select TIME_CODE, AGE_CODE, SUM(TARGET_POP) as 'sum_pop' from SLEEP_TIME_DTL group by TIME_CODE, AGE_CODE) as 'sub140' on ag.AGE_CODE = sub140.AGE_CODE and sub140.TIME_CODE = 140
inner join (select TIME_CODE, AGE_CODE, SUM(TARGET_POP) as 'sum_pop' from SLEEP_TIME_DTL group by TIME_CODE, AGE_CODE) as 'sub150' on ag.AGE_CODE = sub150.AGE_CODE and sub150.TIME_CODE = 150
inner join (select TIME_CODE, AGE_CODE, SUM(TARGET_POP) as 'sum_pop' from SLEEP_TIME_DTL group by TIME_CODE, AGE_CODE) as 'sub160' on ag.AGE_CODE = sub160.AGE_CODE and sub160.TIME_CODE = 160
inner join (select TIME_CODE, AGE_CODE, SUM(TARGET_POP) as 'sum_pop' from SLEEP_TIME_DTL group by TIME_CODE, AGE_CODE) as 'sub170' on ag.AGE_CODE = sub170.AGE_CODE and sub170.TIME_CODE = 170
inner join (select TIME_CODE, AGE_CODE, SUM(TARGET_POP) as 'sum_pop' from SLEEP_TIME_DTL group by TIME_CODE, AGE_CODE) as 'sub180' on ag.AGE_CODE = sub180.AGE_CODE and sub180.TIME_CODE = 180
order by ag.AGE_CODE;
提出情報
提出日時2024/04/01 14:39:19
コンテスト練習用コンテスト
問題年齢別睡眠時間分析
受験者bayou
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量88 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
85 MB
データパターン2
WA
88 MB