ソースコード
SELECT t.CODE AS CODE, t.NAME AS NAME, t.SUM_QTY AS SUM_QTY FROM (
SELECT od.ITEM_CODE AS CODE, i.ITEM_NAME AS NAME, SUM(od.ORDER_QTY) AS SUM_QTY
FROM ORDERS AS o, WAREHOUSE AS wh, ORDERS_DTL AS od
LEFT OUTER JOIN ITEM AS i ON i.ITEM_CODE = od.ITEM_CODE
WHERE
wh.WH_CODE = o.WH_CODE AND wh.WH_NAME = "浦和倉庫"
AND od.ORDER_NO = o.ORDER_NO
GROUP BY od.ITEM_CODE
) as t
WHERE t.SUM_QTY >= 50
ORDER BY t.SUM_QTY DESC, t.CODE DESC;
提出情報
提出日時2024/06/08 15:49:20
コンテスト第1回 SQLコンテスト初級編
問題売れ筋商品
受験者xwvz5
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量97 MB
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
85 MB
データパターン2
AC
97 MB