ソースコード
select
    p.port_code as "港コード",
    port_name as "港名",
    i.total as "入国者数",
    o.total as "出国者数",
    i.total - o.total as "差分"
from port as p
inner join (
    select port_code, sum(amt) as total
    from immigration
    where group_code = 110 and kind_code = 110
    group by port_code
    ) as i on i.port_code = p.port_code
inner join (
    select im.port_code, sum(amt) as total
    from immigration as im
    where group_code = 110 and kind_code = 120
    group by port_code
    ) as o on o.port_code = p.port_code
where "差分" > 0
order by "差分" desc, p.port_code desc;
提出情報
提出日時2022/07/20 21:33:20
コンテスト第1回 SQLコンテスト
問題港入出国者分析
受験者nitumeta339
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量100 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
100 MB
データパターン2
WA
49 MB