ソースコード
SELECT
    tmp.ITEM_CODE AS CODE
	,tmp.ITEM_NAME AS NAME
    ,SUM(tmp.ORDER_QTY) AS SUM_QTY
FROM
    (
	SELECT
		od.ITEM_CODE AS ITEM_CODE
		,i.ITEM_NAME AS ITEM_NAME
		,od.ORDER_QTY AS ORDER_QTY
	FROM
		ORDERS as o
	INNER JOIN
		(
		SELECT
			*
		FROM
			WAREHOUSE
		WHERE
			WH_NAME= '浦和倉庫'
		) AS wh
		ON o.WH_CODE = wh.WH_CODE
	INNER JOIN
		(
		SELECT
			*
		FROM
			ORDERS_DTL
		)AS od
	ON o.ORDER_NO = od.ORDER_NO
	LEFT JOIN
		(
		SELECT
			*
		FROM
			ITEM
		)AS i
	ON od.ITEM_CODE = i.ITEM_CODE
	)AS tmp
GROUP BY
    tmp.ITEM_CODE
HAVING
    SUM(tmp.ORDER_QTY) > 50
ORDER BY 
    SUM_QTY DESC
	,CODE DESC
提出情報
提出日時2024/06/08 12:45:17
コンテスト第1回 SQLコンテスト初級編
問題売れ筋商品
受験者kwm_t
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量86 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
86 MB
データパターン2
WA
85 MB