ソースコード
select age_name as 年齢階層,
       max(case time_code when '120' then cnt end) as '5時間未満',
       max(case time_code when '130' then cnt end) as '5時間以上6時間未満',
       max(case time_code when '140' then cnt end) as '6時間以上7時間未満',
       max(case time_code when '150' then cnt end) as '7時間以上8時間未満',
       max(case time_code when '160' then cnt end) as '8時間以上9時間未満',
       max(case time_code when '170' then cnt end) as '59時間以上',
       max(case time_code when '180' then cnt end) as '不詳'
from (
        select dtl.time_code,
               dtl.age_code,
               dtl.cnt,
               mst_age.age_name,
               mst_sleep.time_name
        from (
                select time_code,
                       age_code,
                       sum(target_pop) as cnt
                  from sleep_time_dtl
                 group by
                       time_code,
                       age_code
             ) dtl
             inner join age_grp mst_age on mst_age.age_code = dtl.age_code
             inner join sleep_time mst_sleep on mst_sleep.time_code = dtl.time_code
     ) tbl
 group by age_code, age_name
 order by age_code
提出情報
提出日時2024/04/21 13:24:01
コンテスト練習用コンテスト
問題年齢別睡眠時間分析
受験者tele
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量85 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
85 MB
データパターン2
WA
85 MB