ソースコード
DELETE FROM ITEM
WHERE ITEM_CODE IN (
SELECT i.ITEM_CODE
FROM ITEM as i
  INNER JOIN STOCK as s
  on i.ITEM_CODE = s.ITEM_CODE
where 
 ( LAST_DELIVERY_DATE >= '2022-12-01' and ACTUAL_AMT = 0)

) or
ITEM_CODE NOT IN (
    SELECT i.ITEM_CODE
FROM ITEM as i
  INNER JOIN STOCK as s
  on i.ITEM_CODE = s.ITEM_CODE
)
and STOCK_MANAGEMENT_TYPE = '1';

-- SELECT i.ITEM_CODE
-- FROM ITEM as i
--   INNER JOIN STOCK as s
--   on i.ITEM_CODE = s.ITEM_CODE
-- where 
--  ( LAST_DELIVERY_DATE >= '2022-12-01' and ACTUAL_AMT = 0)
--  ;
 
--     SELECT i.ITEM_CODE
-- FROM ITEM as i
--   INNER JOIN STOCK as s
--   on i.ITEM_CODE = s.ITEM_CODE
--  ;
 
 
--  SELECT * FROM STOCK;

--  SELECT * FROM ITEM;
提出情報
提出日時2023/06/18 23:25:39
コンテスト第7回 SQLコンテスト
問題商品整理
受験者Hodgepodge
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量78 MB
メッセージ
テストケース(通過数/総数)
0/2
状態
メモリ使用量
データパターン1
WA
78 MB
データパターン2
WA
78 MB