ソースコード
with  hightdata as(
select CATEGORY_CODE,GENDER_CODE,AGE, sum(AVERAGE_VALUE)
from SCHOOL_HEALTH
where SURVEY_YEAR=2019
and CATEGORY_CODE='10'
GROUP BY AGE,CATEGORY_CODE,GENDER_CODE
),weightdata as (
select CATEGORY_CODE,GENDER_CODE,AGE, sum(AVERAGE_VALUE)
from SCHOOL_HEALTH
where SURVEY_YEAR=2019
and CATEGORY_CODE='20'
GROUP BY AGE,CATEGORY_CODE,GENDER_CODE
)


select 
AGE
, case GENDER_CODE
    when '20' then 'MALE'
    else            'FEMALE'
    end as GENDER
--,CATEGORY_CODE
--,SUM(AVERAGE_VALUE)
,round(AVG(AVERAGE_VALUE),2) as avg
from hightdata

where SURVEY_YEAR=2019
GROUP BY AGE,CATEGORY_CODE,GENDER_CODE
order by AGE desc,GENDER_CODE desc
提出情報
提出日時2023/08/21 09:51:38
コンテスト第8回 SQLコンテスト
問題身長と体重
受験者nasu_mi
状態 (詳細)RE
(Runtime Error: 実行時エラー)
メモリ使用量92 MB
メッセージ
SQLITE_ERROR: no such column: AVERAGE_VALUE
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
RE
92 MB
データパターン2
RE
88 MB