Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. SELECT [temp_Emp], [temp_EmpID],[temp_Date],[Temp_Start],[Temp_End],
  2. min(Temp_Start) over (partition by temp_EmpID, temp_Date order by Temp_Start, Temp_End) as 'Start',
  3. max(Temp_End) over (partition by temp_EmpID, temp_Date order by Temp_Start, Temp_End) as 'End'
  4. FROM tmp_startend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement