Link to home
Start Free TrialLog in
Avatar of Peter Nordberg
Peter NordbergFlag for Sweden

asked on

Sum timelog for each day in sql

Hi,

I have a table with data looking like this:
User generated image
The purpose of the table is to register a log for Employees so you can see the times they've worked.
As you can see each day has a rowID and also a TimeClockCatID. The rowID is the id for the specific day they are registering for and the TimeClockCatID is showing if they checked in (1) or checked out (2) from the system.

Is it possible for me to count and sum how much time an employee has worked a day by comparing the TimeClockCatID = 1 with TimeClockCatID  = 2 for each rowID?

Thanks for help!

Peter
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Peter Nordberg

ASKER

Works like a charm:) Thanks!
Peter
Welcome, glad to help..