ソースコード
select
  main.ITEM_CODE as CODE
 ,main.ITEM_NAME as NAME
 ,'ADDED' as COMP_RSLT
from
    ITEM as main
left join
    ITEM_HISTORY as sub using(ITEM_CODE)
where
     sub.USER_UPDATE_DATETIME is null
union ALL
select
  main.ITEM_CODE as CODE
 ,main.ITEM_NAME as NAME
 ,'UPDATED' as COMP_RSLT
from
    ITEM as main
left join
    ITEM_HISTORY as sub using(ITEM_CODE)
where
    main.USER_UPDATE_DATETIME > sub.USER_UPDATE_DATETIME
union all
select
  main.ITEM_CODE as CODE
 ,main.ITEM_NAME as NAME
 ,'DELETED' as COMP_RSLT
from
    ITEM_HISTORY as main
left join
    ITEM as sub using(ITEM_CODE)
where
     sub.USER_UPDATE_DATETIME is null
order by
     CODE desc
提出情報
提出日時2024/04/21 16:12:34
コンテスト第12回 SQLコンテスト
問題データ操作履歴
受験者kon-kitsune
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量83 MB
メッセージ
テストケース(通過数/総数)
3/3
状態
メモリ使用量
データパターン1
AC
83 MB
データパターン2
AC
83 MB
データパターン3
AC
83 MB