ソースコード
WITH HANKAKUUME AS (
  SELECT
    EMP_CODE,
    replace(EMP_LAST_NAME, " ", "") AS `EMP_LAST_NAME`,
    replace(EMP_FIRST_NAME, " ", "") AS `EMP_FIRST_NAME`
  FROM
    EMP
),
KABURI AS (
  SELECT
    EMP_LAST_NAME || " " || EMP_FIRST_NAME AS LAST_FIRST,
    COUNT(1) AS `CNT`
  FROM
    HANKAKUUME
  GROUP BY
    LAST_FIRST
  HAVING
    CNT > 1
)
SELECT
  EMP_CODE AS `CODE`,
  EMP_LAST_NAME AS `SURNAME`,
  EMP_FIRST_NAME AS `NAME`
FROM
  EMP
WHERE
  replace(EMP_LAST_NAME, " ", "") || " " || replace(EMP_FIRST_NAME, " ", "") IN (
    SELECT
      LAST_FIRST
    FROM
      KABURI
  )
  AND VALID_FLG = '1'
ORDER BY
  replace(EMP_LAST_NAME, " ", ""),
  replace(EMP_FIRST_NAME, " ", ""),
  EMP_CODE
提出情報
提出日時2023/02/19 16:47:39
コンテスト第5回 SQLコンテスト
問題同姓同名抽出
受験者jf1hnl
状態 (詳細)WA
(Wrong Answer: 誤答)
メモリ使用量97 MB
メッセージ
テストケース(通過数/総数)
0/3
状態
メモリ使用量
データパターン1
WA
93 MB
データパターン2
WA
80 MB
データパターン3
WA
97 MB