ソースコード

with ta as (select ITEM_CODE, ITEM_NAME,  USER_UPDATE_DATETIME as time0
from ITEM),
tb as
(
select ITEM_CODE, ITEM_NAME, time0, time1
from ta
full outer join (select ITEM_CODE, ITEM_NAME, USER_UPDATE_DATETIME as time1
from ITEM_HISTORY) using ( ITEM_CODE, ITEM_NAME)),


tc as 
(select ITEM_CODE, ITEM_NAME, 
(case when time0 = time1 then "OK" when time0 is null then "DELETED" when time1 is null then "ADDED" else "UPDATED" end) as COMP_RSLT
from tb)

select ITEM_CODE as CODE, ITEM_NAME as NAME, COMP_RSLT from tc where COMP_RSLT != "OK"
order by ITEM_CODE desc
提出情報
提出日時2024/04/22 11:18:39
コンテスト第12回 SQLコンテスト
問題データ操作履歴
受験者Tomii9273
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量97 MB
メッセージ
テストケース(通過数/総数)
3/3
状態
メモリ使用量
データパターン1
AC
97 MB
データパターン2
AC
82 MB
データパターン3
AC
82 MB