ソースコード
SELECT OD.ITEM_CODE AS CODE,
(SELECT I.ITEM_NAME FROM ITEM I
WHERE I.ITEM_CODE = OD.ITEM_CODE)
 AS NAME,
(SELECT SUM(ORDER_QTY) FROM ORDERS_DTL
GROUP BY ITEM_CODE) AS SUM_QTY
FROM ORDERS_DTL AS OD, ORDERS AS O
WHERE O.ORDER_NO IN
(SELECT * FROM ORDERS
WHERE WH_CODE IN(
SELECT WH_CODE, WH_NAME FROM WAREHOUSE
WHERE WH_NAME IN('浦和倉庫')))
HAVING (SELECT SUM(ORDER_QTY) FROM ORDERS_DTL
GROUP BY ITEM_CODE) > 50
ORDER BY SUM_QTY DESC, OD.ITEM_CODE;
提出情報
提出日時2024/06/07 15:00:15
コンテスト第1回 SQLコンテスト初級編
問題売れ筋商品
受験者Nio-pie
状態 (詳細)RE
(Runtime Error: 実行時エラー)
メモリ使用量98 MB
メッセージ
SQLITE_ERROR: HAVING clause on a non-aggregate query
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
RE
87 MB
データパターン2
RE
98 MB