ソースコード
with added as (
  select ITEM.ITEM_CODE, ITEM.ITEM_NAME from ITEM left join ITEM_HISTORY on ITEM.ITEM_CODE = ITEM_HISTORY.ITEM_CODE
  where ITEM_HISTORY.ITEM_NAME IS NULL
),
updated AS (
  select ITEM.ITEM_CODE, ITEM.ITEM_NAME from ITEM join ITEM_HISTORY on ITEM.ITEM_CODE = ITEM_HISTORY.ITEM_CODE
  where ITEM.USER_UPDATE_DATETIME != ITEM_HISTORY.USER_UPDATE_DATETIME
),
deleted AS (
  select ITEM_HISTORY.ITEM_CODE, ITEM_HISTORY.ITEM_NAME from ITEM_HISTORY left join ITEM on ITEM.ITEM_CODE = ITEM_HISTORY.ITEM_CODE
  where ITEM.ITEM_NAME IS NULL
)
select ITEM_CODE as CODE, ITEM_NAME as NAME, COMP_RESULT from
(
select *, 'ADDED' as COMP_RESULT from added
union all
select *, 'UPDATED' as COMP_RESULT from updated
union all
select *, 'DELETED' as COMP_RESULT from deleted
)
order by CODE desc
;
提出情報
提出日時2024/04/21 17:20:08
コンテスト第12回 SQLコンテスト
問題データ操作履歴
受験者daku10
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量86 MB
メッセージ
テストケース(通過数/総数)
0/3
状態
メモリ使用量
データパターン1
WA
86 MB
データパターン2
WA
84 MB
データパターン3
WA
83 MB