ソースコード
with time_codes_by_age as (
    select
        age_code,
        sum( case when time_code = 120 then target_pop end ) as target_120,
        sum( case when time_code = 130 then target_pop end ) as target_130,
        sum( case when time_code = 140 then target_pop end ) as target_140,
        sum( case when time_code = 150 then target_pop end ) as target_150,
        sum( case when time_code = 160 then target_pop end ) as target_160,
        sum( case when time_code = 170 then target_pop end ) as target_170,
        sum( case when time_code = 180 then target_pop end ) as target_180
    from sleep_time_dtl
    group by age_code
) select
    age_grp.age_name,
    time_codes_by_age.target_120 as '5時間未満',
    time_codes_by_age.target_130 as '5時間以上6時間未満',
    time_codes_by_age.target_140 as '6時間以上7時間未満',
    time_codes_by_age.target_150 as '7時間以上8時間未満',
    time_codes_by_age.target_160 as '8時間以上9時間未満',
    time_codes_by_age.target_170 as '9時間以上',
    time_codes_by_age.target_180 as '不詳'
from
    time_codes_by_age,
    age_grp
where
    age_grp.age_code = time_codes_by_age.age_code
order by age_grp.age_code
;
提出情報
提出日時2023/04/19 14:38:17
コンテスト練習用コンテスト
問題年齢別睡眠時間分析
受験者masanorih
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量82 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
82 MB
データパターン2
WA
82 MB