Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT [temp_Emp], [temp_EmpID],[temp_Date],[Temp_Start],[Temp_End],
- min(Temp_Start) over (partition by temp_EmpID, temp_Date order by Temp_Start, Temp_End) as 'Start',
- max(Temp_End) over (partition by temp_EmpID, temp_Date order by Temp_Start, Temp_End) as 'End'
- FROM tmp_startend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement