ソースコード
select AGE_GRP.AGE_NAME
      ,t4."5時間未満"
      ,t5."5時間以上6時間未満"
      ,t6."6時間以上7時間未満"
      ,t7."7時間以上8時間未満"
      ,t8."8時間以上9時間未満"
      ,t9."9時間以上"
      ,t10."不詳"
    from AGE_GRP
        inner join (select TIME_CODE,AGE_CODE, sum(TARGET_POP) as "5時間未満"
            from SLEEP_TIME_DTL 
            where TIME_CODE = 120
            group by AGE_CODE) as t4
            on AGE_GRP.AGE_CODE = t4.AGE_CODE
        inner join (select AGE_CODE, 
        sum(TARGET_POP) as "5時間以上6時間未満"
            from SLEEP_TIME_DTL 
            where TIME_CODE = 130
            group by AGE_CODE) as t5
            on AGE_GRP.AGE_CODE = t5.AGE_CODE
        inner join (select AGE_CODE, 
        sum(TARGET_POP) as "6時間以上7時間未満"
            from SLEEP_TIME_DTL 
            where TIME_CODE = 140
            group by AGE_CODE) as t6
            on AGE_GRP.AGE_CODE = t6.AGE_CODE
        inner join (select AGE_CODE, 
        sum(TARGET_POP) as "7時間以上8時間未満"
            from SLEEP_TIME_DTL 
            where TIME_CODE = 150
            group by AGE_CODE) as t7
            on AGE_GRP.AGE_CODE = t7.AGE_CODE
        inner join (select AGE_CODE, 
        sum(TARGET_POP) as "8時間以上9時間未満"
            from SLEEP_TIME_DTL 
            where TIME_CODE = 160
            group by AGE_CODE) as t8
            on AGE_GRP.AGE_CODE = t8.AGE_CODE
        inner join (select AGE_CODE, 
        sum(TARGET_POP) as "9時間以上"
            from SLEEP_TIME_DTL 
            where TIME_CODE = 170
            group by AGE_CODE) as t9
            on AGE_GRP.AGE_CODE = t9.AGE_CODE 
        inner join (select AGE_CODE, 
        sum(TARGET_POP) as "不詳"
            from SLEEP_TIME_DTL 
            where TIME_CODE = 180
            group by AGE_CODE) as t10
            on AGE_GRP.AGE_CODE = t10.AGE_CODE
        ;
提出情報
提出日時2023/08/07 17:38:19
コンテスト練習用コンテスト
問題年齢別睡眠時間分析
受験者wr277032
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量80 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
80 MB
データパターン2
WA
79 MB