owais ahmed

owais ahmed

  • NA
  • 91
  • 2.9k

i need Report to SQL Query kindly Help me.

Dec 29 2017 9:18 AM

Database Table
Sno Time UserID Date IN/Out Status
1 4:45:52 PM 1 12/28/2017 IN
2 4:58:13 PM 2 12/28/2017 IN
3 4:58:25 PM 1 12/28/2017 OUT
4 4:58:34 PM 2 12/28/2017 OUT
4 4:45:52 PM 1 12/29/2017 IN
5 4:58:13 PM 2 12/29/2017 IN
6 4:58:25 PM 1 12/29/2017 OUT
7 4:58:34 PM 2 12/29/2017 OUT
 
 
 

I need Report to SQL Query kindly Help me.

Report Required
sno User ID Date IN OUT Time Difference
1 1 12/28/2017 4:45:52 PM 4:58:25 PM 12:33.0
2 2 12/28/2017 4:58:13 PM 4:58:34 PM 00:21.1
3 1 12/29/2017 4:45:52 PM 4:58:25 PM 12:33.0
4 2 12/29/2017 4:58:13 PM 4:58:34 PM 00:21.1
 
 

Answers (5)