Hi Friends,
I have the following table structure
ID Datetime status
1 2025-10-15 1:03:53 PM T2
1 2025-10-15 12:37:42 PM T2
1 2025-10-15 12:41:22 PM T2
3 2025-10-15 12:26:18 PM T2
3 2025-10-15 12:21:47 PM T2
I need the output in the sql server
Status ID startdate Enddate
T2 1 2025-10-15 12:41:22 PM 2025-10-15 1:03:53 PM
T2 3 2025-10-15 12:21:47 PM 2025-10-15 12:26:18 PM