ソースコード
select D.pf_code as 'CODE'
    , (select pf_name from prefecture as P where P.pf_code=D.pf_code) as 'NAME'

    , round (
     cast( sum ( case  category_code when '120' then amt else 0 end ) as real )
     / cast( sum ( case  category_code when '110' then amt else 0 end ) as real ) 
     *100
     , 1 ) as PERCENTAGE
     
from drink_habits as D
where gender_code in ( '2' , '3')
group by D.pf_code
order by 3 desc , D.pf_code
提出情報
提出日時2023/10/26 14:32:43
コンテスト第2回 SQLコンテスト
問題飲酒率
受験者hmasa
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量75 MB
メッセージ
テストケース(通過数/総数)
1/2
状態
メモリ使用量
データパターン1
WA
75 MB
データパターン2
AC
74 MB