The query I have to make is:
List the combined total hours worked of all the academic staff per week, the maximum hours worked, minimum hours
worked, the name and subject of the academic staff who had the maximum hours , the name and subject of the academic staff who had the minimum hours worked.
The tables I ‘can’ use to get this from are:
(**Table**) ApprovedUnits (**Fields**): ApprovedID, EmployeeID, UnitCode
(**Table**) Employees (**Fields**): EmployeeID, FirstName, LastName
(**Table**) Timesheet (**Fields**): TimesheetID, EmployeeID, Date, Hours, WeekNo
(**Table**) Units (**Fields**): UnitCode, UnitName
This is the SQL query I have so far:
SELECT SUM(Timesheet.Hours),
FROM Timesheet, Employees, Units
WHERE Timesheet.Hours < MAX
AND Employees.FirstName, Employees.LastName
;
This is all I have at the moment, I have no idea where to go from there, can someone please give me some pointers? Or ideas on how I can continue with this?