ソースコード
select 
ODI.ITEM_CODE AS CODE,
ODI.ITEM_NAME AS NAME,
ODI.ODI_SUM_QTY AS SUM_QTY
FROM ORDERS AS O
FULL OUTER JOIN WAREHOUSE AS W
ON O.WH_CODE = W.WH_CODE
INNER JOIN 
(
SELECT
SUM(OD.ORDER_QTY)OVER() AS ODI_SUM_QTY,
OD.ORDER_NO AS ORDER_NO,
OD.ITEM_CODE AS ITEM_CODE,
I.ITEM_CODE AS ITEM_NAME
FROM ORDERS_DTL AS OD
FULL OUTER JOIN ITEM AS I
ON OD.ITEM_CODE = I.ITEM_CODE
GROUP BY I.ITEM_CODE
) AS ODI
ON O.ORDER_NO = ODI.ORDER_NO
WHERE W.WH_NAME = '浦和倉庫'
AND ODI.ODI_SUM_QTY >= 50
ORDER BY
ODI.ODI_SUM_QTY DESC,
ODI.ITEM_CODE DESC;
提出情報
提出日時2024/06/09 14:21:35
コンテスト第1回 SQLコンテスト初級編
問題売れ筋商品
受験者hamagucchi
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量91 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
91 MB
データパターン2
WA
83 MB