ソースコード
SELECT
    OD.ITEM_CODE AS CODE,
    IT.ITEM_NAME AS NAME,
    S1.TOTAL AS SUM_QTY
FROM
    ORDERS OH
    INNER JOIN WAREHOUSE WH ON OH.WH_CODE = WH.WH_CODE
    INNER JOIN ORDERS_DTL OD ON OH.ORDER_NO = OD.ORDER_NO
    INNER JOIN
    (
        SELECT
            ORDER_NO,
            ITEM_CODE,
            SUM(ORDER_QTY) AS TOTAL
        FROM
            ORDERS_DTL
        GROUP BY
            ORDER_NO, ITEM_CODE
        HAVING
            TOTAL >= 50
    ) S1 ON OD.ORDER_NO = S1.ORDER_NO AND OD.ITEM_CODE = S1.ITEM_CODE
    LEFT JOIN ITEM IT ON OD.ITEM_CODE = IT.ITEM_CODE,
    ORDERS_DTL
WHERE
    WH.WH_NAME = '浦和倉庫'
GROUP BY
    CODE
ORDER BY
    SUM_QTY DESC, CODE DESC
提出情報
提出日時2024/06/07 13:46:48
コンテスト第1回 SQLコンテスト初級編
問題売れ筋商品
受験者nocopylight
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量92 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
92 MB
データパターン2
WA
91 MB