pankaj pareek
Wednesday, April 24, 2013
How to get max record from each department SQL SERVER
with cte as ( select *, rank() over (partition by User_Name order by Start_Timestamp desc) as [r] from AUDIT_EVENT ) select User_Name,Start_Timestamp from cte where [r] = 1;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment