I am having a difficulty making a query. This is the situation:
I have two tables: Persons and Work
Persons: ID, LastName, FirstName
Work: ID, PresonID, WorkType, Start, End
WorkType in Work table is nvarchar type and Start and End is datetime type.
There is 14 of possible combinations in WorkType
I need to make a query to get all the persons and the summed number of minutes (DATEDIFF(minute,Start, End)) by every WorkType.
Thanks in advance
View Complete Post