ソースコード
select
  t1.pf_code as CODE,
  t1.pf_name as NAME,
  round((sum(case when category_code = '120' and gender_code in ('2', '3') then amt else 0 end) * 1.0 / sum(amt)) * 100, 1) as PERCENTAGE
from prefecture t1
inner join drink_habits t2
  on t1.pf_code = t2.pf_code
group by 1, 2
order by 3 desc, 1 desc
;
提出情報
提出日時2022/09/22 11:41:24
コンテスト第2回 SQLコンテスト
問題飲酒率
受験者drcatmka13
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量94 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
94 MB
データパターン2
WA
80 MB