This is a non-normalized table structure which is going to give you problems. For instance, let's say Instead of ABC road, someone puts in ABD road, even though it may actually be the same location and it was just mistyped it's going to come through as a different line for the same location.
That aside you can get your employee count by doing something like (I'm assuming ID is the employee ID, which should be stored on your table and not the employee name, same with your job code, that, I assume is the employee's job title/class which should be stored in a separate table)
Code:
SELECT LOCATION, ID, Sum(EARNINGS) as TOT_EARNINGS FROM <TABLE NAME HERE> GROUP BY LOCATION, ID
This should give you a count of employees by location and their total earnings for that location, if you want it for a specific time period, etc you'd have to add criteria to the query but this is the basic aggregate query you want.
The next thing you'd need is a summary of this query to condense it to a number of employees and their total earnings for the three major locations so let's say you named the first query "qry_Summary_Pre" you would make a second query
Code:
SELECT LOCATION, Count(ID) as EmployeeCount, Sum(Tot_Earnings) as LocationEarnings FROM qry_Summary_Pre GROUP BY Location
The third part of this is how do you get your cost centers into this query and there are a couple of ways to do this. If you only have the five cost centers you've indicated in your sample you can include those columns in your qry_Summary_Pre by doing something like:
Code:
SELECT LOCATION, ID, Sum(EARNINGS) as TOT_EARNINGS, Sum(Iif(Left([Class Code], 4) = "7539", [Earnings], 0)) as [7539 - Plant Ops] FROM <TABLE NAME HERE> GROUP BY LOCATION, ID
I didn't test this code so it may bomb but basically you're testing the class code string for the left four characters being your cost center, if they are equal you add the earnings, if it's not, you don't, then summing those values and giving it an alias (a different name) in this case "7539 - Plant Ops".
Then you can simply sum the values in your second query.
If you have more cost centers than your example, and it has a variable number of cost centers every time you run the report you may consider a crosstab query, be aware, however, that if you create a crosstab query you will likely not be able to base a report on it unless you're very careful about how you set it up.