Thursday, 10 October 2024

Same EMployee have 5 recrods to get only one record.

 


WITH RankedRecords AS (

    SELECT 

        *,

        ROW_NUMBER() OVER (PARTITION BY AppraisalID ORDER BY ModifiedDate) AS RowNum

    FROM 

        tbl_EmpCompetencies

)

SELECT *

FROM RankedRecords

WHERE RowNum = 1;

No comments:

Post a Comment

HCL healthcare

 hcl health care f2f second round interview asked more uestions on microservice 1.apim manage all apis in one place 2.sql profiler in one fo...