ソースコード
SELECT
	t1.CODE
	,t1.SURNAME
	,t1.NAME
FROM
	(
	SELECT
	    EMP_CODE AS CODE
	    ,EMP_LAST_NAME AS SURNAME
	    ,EMP_FIRST_NAME AS NAME
		,REPLACE(EMP_LAST_NAME,' ','') AS hanSURNAME
		,REPLACE(EMP_FIRST_NAME,' ','') AS hanNAME
		,REPLACE(EMP_LAST_NAME,' ','') || REPLACE(EMP_FIRST_NAME,' ','') AS seimei
	FROM EMP
	WHERE VALID_FLG = '1'
	) AS t1
CROSS JOIN
	(
	SELECT
	    EMP_CODE AS CODE
		,REPLACE(EMP_LAST_NAME,' ','') AS hanSURNAME
		,REPLACE(EMP_FIRST_NAME,' ','') AS hanNAME
	FROM EMP
	WHERE VALID_FLG = '1'
	) AS t2
WHERE t1.CODE <> t2.CODE
	AND t1.hanSURNAME = t2.hanSURNAME
	AND t1.hanNAME = t2.hanNAME
ORDER BY t1.seimei,t1.CODE
提出情報
提出日時2023/02/18 12:10:24
コンテスト第5回 SQLコンテスト
問題同姓同名抽出
受験者katsu
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量81 MB
メッセージ
テストケース(通過数/総数)
2/3
状態
メモリ使用量
データパターン1
AC
78 MB
データパターン2
WA
81 MB
データパターン3
AC
81 MB