ソースコード
create temporary table TEST01 
as
select
    EMP_CODE
    ,EMP_LAST_NAME
    ,EMP_FIRST_NAME
    ,EMP_LAST_NAME as LN
    ,EMP_FIRST_NAME as FN
from
    EMP
where
    VALID_FLG='1'
;

UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');
UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');
UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');
UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');
UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');
UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');
UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');
UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');
UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');
UPDATE TEST01 SET LN = REPLACE(LN, ' ', '');

UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');
UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');
UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');
UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');
UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');
UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');
UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');
UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');
UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');
UPDATE TEST01 SET FN = REPLACE(FN, ' ', '');



select
    E1.EMP_CODE as CODE
    ,E1.EMP_LAST_NAME as SURNAME
    ,E1.EMP_FIRST_NAME as NAME
from
    TEST01 E1
    inner join
        TEST01 E2
        on
            E1.FN=E2.FN
            and
            E1.LN=E2.LN
            and
            E1.EMP_CODE <> E2.EMP_CODE
order by 
    E1.FN
    ,E1.LN
    ,1
提出情報
提出日時2023/02/19 20:18:42
コンテスト第5回 SQLコンテスト
問題同姓同名抽出
受験者1120011
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量89 MB
メッセージ
テストケース(通過数/総数)
1/3
状態
メモリ使用量
データパターン1
AC
78 MB
データパターン2
WA
79 MB
データパターン3
WA
89 MB