1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] How do I count duplicate rows in a table without using count function

Discussão em 'Outras Linguagens' iniciado por Stack, Setembro 27, 2024 às 16:52.

  1. Stack

    Stack Membro Participativo

    Given the below,

    WITH cte AS (
    SELECT employeeId, employeeName,
    ROW_NUMBER() OVER (PARTITION BY employeeName ORDER BY employeeId asc) AS rn
    FROM duplicateEmployee
    )
    SELECT * FROM cte WHERE rn > 1


    I need to count the duplicate records without using count function from the duplicateEmployee table. Please suggest me to how to modify the above query.

    Continue reading...

Compartilhe esta Página