I have two tables.
Table 1: Actuals
A table with all the employess and how many hours they have worked in a given month
| ID | empID | hours | Month | --------------------------------------
Table 2:
A target table which has hour target per month. The target refers to an amount that the sum of all the hours worked by the employees should meet.
| ID | hours target | Month | -----------------------------------
Is it possible to return the sum of all table 1’s hours with the target of table 2 and group it by the month and return it in a single data set?
Example
| Month | Actual Hours | hours target | ----------------------------------------- | 1 | 320 | 350 |
etc.
Hope that is clear enough and many thanks for considering the question.
This should work:
Written in plain English, you’re saying “give me the sum of all hours accrued, grouped by the month (and also include the target hours for that month)”.