ソースコード
select AGE_NAME as "年齢階層", TC_120 as "5時間未満", TC_130 as "5時間以上6時間未満", TC_140 as "6時間以上7時間未満",
    TC_150 as "7時間以上8時間未満", TC_160 as "8時間以上9時間未満", TC_170 as "9時間以上", TC_180 as "不詳"
    from AGE_GRP
    left outer join (select AGE_CODE as AGE_CODE1, sum(TARGET_POP) as TC_120 from SLEEP_TIME_DTL where TIME_CODE = 120 group by TIME_CODE, AGE_CODE1) on AGE_CODE = AGE_CODE1
    left outer join (select AGE_CODE as AGE_CODE2, sum(TARGET_POP) as TC_130 from SLEEP_TIME_DTL where TIME_CODE = 130 group by TIME_CODE, AGE_CODE2) on AGE_CODE = AGE_CODE2
    left outer join (select AGE_CODE as AGE_CODE3, sum(TARGET_POP) as TC_140 from SLEEP_TIME_DTL where TIME_CODE = 140 group by TIME_CODE, AGE_CODE3) on AGE_CODE = AGE_CODE3
    left outer join (select AGE_CODE as AGE_CODE4, sum(TARGET_POP) as TC_150 from SLEEP_TIME_DTL where TIME_CODE = 150 group by TIME_CODE, AGE_CODE4) on AGE_CODE = AGE_CODE4
    left outer join (select AGE_CODE as AGE_CODE5, sum(TARGET_POP) as TC_160 from SLEEP_TIME_DTL where TIME_CODE = 160 group by TIME_CODE, AGE_CODE5) on AGE_CODE = AGE_CODE5
    left outer join (select AGE_CODE as AGE_CODE6, sum(TARGET_POP) as TC_170 from SLEEP_TIME_DTL where TIME_CODE = 170 group by TIME_CODE, AGE_CODE6) on AGE_CODE = AGE_CODE6
    left outer join (select AGE_CODE as AGE_CODE7, sum(TARGET_POP) as TC_180 from SLEEP_TIME_DTL where TIME_CODE = 180 group by TIME_CODE, AGE_CODE7) on AGE_CODE = AGE_CODE7
    where TC_120 is not null
    ;
提出情報
提出日時2022/07/06 15:57:18
コンテスト練習用コンテスト
問題年齢別睡眠時間分析
受験者onozawa-h
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量81 MB
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
81 MB
データパターン2
AC
79 MB