ソースコード
SELECT 
    [OD].[ITEM_CODE] AS [CODE],
    [I].[ITEM_NAME] AS [NAME],
    SUM([OD].[ORDER_QTY]) AS [SUM_QTY]
FROM 
    [ORDERS] AS [O]
    LEFT OUTER JOIN [ORDERS_DTL] AS [OD] ON [O].[ORDER_NO] = [OD].[ORDER_NO]
    LEFT OUTER JOIN [WAREHOUSE] AS [W] ON [O].[WH_CODE] = [W].[WH_CODE]
    LEFT OUTER JOIN [ITEM] AS [I] ON [OD].[ITEM_CODE] = [I].[ITEM_CODE]
WHERE 
    [O].[WH_CODE] IN (
        SELECT [WH_CODE]
        FROM [WAREHOUSE]
        WHERE [WH_NAME] = '浦和倉庫'
    )
GROUP BY 
    [OD].[ITEM_CODE],
    [I].[ITEM_NAME]
HAVING 
    SUM([OD].[ORDER_QTY]) >= 50
ORDER BY 
    [SUM_QTY] DESC,
    [CODE] DESC;
提出情報
提出日時2024/06/10 11:56:21
コンテスト第1回 SQLコンテスト初級編
問題売れ筋商品
受験者kkkkyyyy
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量91 MB
メッセージ
テストケース(通過数/総数)
2/2
状態
メモリ使用量
データパターン1
AC
89 MB
データパターン2
AC
91 MB