Hello Everyone,
how to get total working hours per day with respect to a HolderName using sql query?
This is the sql table that contain input/output date and time with input/output status.
Kindly answer me.
Thanks advance.
| ID | CardNo | HolderNo | HolderName | IODate | IOTime | IOGateNo | IOGateName | IOStatus |
| 1 | 118 | 85 | Raj | 1/1/2016 | 12:14PM | 1-Jan | Door #1(I/O) | Entry |
| 2 | 118 | 85 | Raj | 1/1/2016 | 12:14PM | 2-Jan | Door #2(I/O) | Entry |
| 3 | 118 | 85 | Raj | 1/1/2016 | 12:14PM | 6-Jan | Door #2(I/O) | Exit |
| 4 | 118 | 85 | Raj | 1/1/2016 | 12:15PM | 2-Jan | Door #2(I/O) | Entry |
| 5 | 118 | 85 | Raj | 1/1/2016 | 4:05PM | 6-Jan | Door #2(I/O) | Exit |
| 6 | 118 | 85 | Raj | 1/1/2016 | 4:05PM | 5-Jan | Door #1(I/O) | Exit |
| 7 | 118 | 85 | Raj | 1/1/2016 | 4:08PM | 1-Jan | Door #1(I/O) | Entry |
| 8 | 118 | 85 | Raj | 1/1/2016 | 4:08PM | 2-Jan | Door #2(I/O) | Entry |
| 9 | 118 | 85 | Raj | 1/1/2016 | 4:09PM | 6-Jan | Door #2(I/O) | Exit |
| 10 | 118 | 85 | Raj | 1/1/2016 | 4:09PM | 5-Jan | Door #1(I/O) | Exit |

Midhun TpRank #388 · 6.5K reputationPosted Sep 6, 2016, 5:40 AM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted Sep 6, 2016, 9:35 PM EDT
Nitin SontakkeRank #264 · 9.6K reputationPosted Sep 7, 2016, 12:21 AM EDT
Abhilash J ARank #1,243 · 1.4K reputationPosted Sep 6, 2016, 9:09 PM EDT
Abhilash J ARank #1,243 · 1.4K reputationPosted Sep 6, 2016, 11:33 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts