Mar 14 2021
Hi, am new to SQL and am seeking some support in writing a query.
I have a table of timesheet records (multiple records per day, per employee) which I am looking to summarise into a view by Work Type.
The table has the following fields
Work Type (Ordinary, 1.5x and Leave)
Which I am looking to present as a view with the following fields
Hours Type Ordinary
Hours Type 1.5x
Hours Type Leave
Any help with the syntax would be greatly appreciated!
View best response
Mar 17 2021
You can use SQL Pivot query structure for your requirement
Please refer to tutorial for more samples
Here is the SQL query that will help you
Date, Employee, WorkType, Hours