How to get First Row of Each group in a Table
WITH FirstEmployeeOf_EachDepartment
AS
(
SELECT E.Employee_ID , E.Name,E.Age , E.Department_ID,
ROW_NUMBER () OVER (PARTITION BY E.NAME ORDER BY E.Employee_ID Desc) AS RN
FROM Employee E)
SELECT F.Employee_ID,F.Name,f.Age,f.Department_ID FROM FirstEmployeeOf_EachDepartment F
Where f.RN = 1
Share This with your friend by choosing any social account
Jack Carter
2 hours agoi think that some how, we learn who we really are and then live with that decision, great post!
you can view the more detail via link https://www.youtube.com/watch?v=HpZgwHU1GcIChing xang
2 hours agoi think that some how, we learn who we really are and then live with that decision, great post!
Danial Comb
2 hours agoi think that some how, we learn who we really are and then live with that decision, great post!
Jack Carter
2 hours agoi think that some how, we learn who we really are and then live with that decision, great post!