ソースコード
WITH D1 AS (
SELECT
	ITEM_CODE
,	ITEM_NAME
FROM
	ITEM_HISTORY
EXCEPT
SELECT
	ITEM_CODE
,	ITEM_NAME
FROM
	ITEM
),
U1 AS (
SELECT
	ITEM_CODE
,	ITEM_NAME
,	USER_UPDATE_DATETIME
FROM
	ITEM_HISTORY
EXCEPT
SELECT
	ITEM_CODE
,	ITEM_NAME
,	USER_UPDATE_DATETIME
FROM
	ITEM
),
A1 AS (
SELECT
	ITEM_CODE
,	ITEM_NAME
FROM
	ITEM
EXCEPT
SELECT
	ITEM_CODE
,	ITEM_NAME
FROM
	ITEM_HISTORY
),
U2 AS (
SELECT
	ITEM_CODE
,	ITEM_NAME
FROM
	U1
EXCEPT
SELECT
	ITEM_CODE
,	ITEM_NAME
FROM
	D1
),
U3 AS (
SELECT
	ITEM_CODE
,	ITEM_NAME
FROM
	U2
EXCEPT
SELECT
	ITEM_CODE
,	ITEM_NAME
FROM
	A1
)
SELECT
	ITEM_CODE AS CODE
,	ITEM_NAME AS NAME
,	'ADDED' AS COMP_RSLT
FROM
	A1
UNION
SELECT
	ITEM_CODE AS CODE
,	ITEM_NAME AS NAME
,	'UPDATED' AS COMP_RSLT
FROM
	U3
UNION
SELECT
	ITEM_CODE AS CODE
,	ITEM_NAME AS NAME
,	'DELETED' AS COMP_RSLT
FROM
	D1
ORDER BY
	CODE DESC
提出情報
提出日時2024/04/22 10:13:36
コンテスト第12回 SQLコンテスト
問題データ操作履歴
受験者tomoko
状態 (詳細)AC
(Accepted: 正答)
メモリ使用量86 MB
メッセージ
テストケース(通過数/総数)
3/3
状態
メモリ使用量
データパターン1
AC
83 MB
データパターン2
AC
86 MB
データパターン3
AC
86 MB