ソースコード
select
AGE_NAME as 年齢階層
,T120.TARGET_POP as "5時間未満"
,T130.TARGET_POP as "5時間以上6時間未満"
,T140.TARGET_POP as "6時間以上7時間未満"
,T150.TARGET_POP as "7時間以上8時間未満"
,T160.TARGET_POP as "8時間以上9時間未満"
,T170.TARGET_POP as "9時間以上"
,T180.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) T120
using(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) T130
using(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) T140
using(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) T150
using(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) T160
using(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) T170
using(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) T180
using(AGE_CODE)
order by AGE_CODE
提出情報
提出日時2022/12/09 17:42:11
コンテスト練習用コンテスト
問題年齢別睡眠時間分析
受験者yuuki_n
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量94 MB
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
94 MB
データパターン2
AC
91 MB