This is the SQL I have written. I need to sum TotEmp #'s (with the same LocationId) and then divide that sum by the sum of EST
There are multiple lines with the same locationId, different TotEmp and different EST?
comes up with SYNTAX ERROR
There are multiple lines with the same locationId, different TotEmp and different EST?
Code:
SELECT [Total Employee per Zip].LocationId, ([Total Employee per Zip].TotEmp)/SUM [Total Employee per Zip].EST FROM [Total Employee per Zip] GROUP BY [Total Employee per Zip].LocationId;
Comment