ソースコード
select
  detail.item_code as CODE,
  detail.item_name as NAME,
  sum(detail.D_SUM_QTY) as SUM_QTY
from
  orders o
  inner join warehouse w on o.wh_code = w.wh_code
  left outer join (
    select
      d.order_no,
      d.line_no,
      d.item_code,
      i.item_name,
      sum(d.order_qty) as D_SUM_QTY
    from
      orders_dtl d
      left outer join item i on d.item_code = i.item_code
    group by
      d.order_no,
      d.line_no,
      d.item_code,
      i.item_name
  ) as detail on detail.order_no = o.order_no
where
  w.wh_code = '100'
group by
  CODE,
  NAME
  having SUM_QTY >= 50
order by
  SUM_QTY desc,
  CODE desc;
提出情報
提出日時2024/06/10 12:24:13
コンテスト第1回 SQLコンテスト初級編
問題売れ筋商品
受験者matukoto
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量85 MB
メッセージ
テストケース(通過数/総数)
1/2
状態
メモリ使用量
データパターン1
AC
83 MB
データパターン2
WA
85 MB