ソースコード
with SUM as ( 
    select ITEM_CODE , sum(ORDER_QTY) as QTY from ORDERS_DTL group by ITEM_CODE having QTY > 50 
)

select distinct D.ITEM_CODE as CODE , (select ITEM.ITEM_NAME from ITEM where D.ITEM_CODE = ITEM.ITEM_CODE ) as NAME , S.QTY as SUM_QTY
from ORDERS_DTL as D 
inner join SUM as S on D.ITEM_CODE = S.ITEM_CODE 
    where D.ORDER_NO in ( select ORDER_NO from ORDERS where ORDERS.WH_CODE in ( select WH_CODE from WAREHOUSE where WH_NAME = '浦和倉庫') )
--   and D.item_code in ( select ITEM_CODE from SUB  ) 
order by 3 desc , 1 desc
提出情報
提出日時2024/06/07 14:56:13
コンテスト第1回 SQLコンテスト初級編
問題売れ筋商品
受験者hmasa
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量98 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
87 MB
データパターン2
WA
98 MB