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

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