Select EMPLOYEE_ID,
SUM (TAXWAGES) AS [TAX AMOUNT],
SUM( TAXWAGES) AS [STATE TAX]
From TABLE A
WHERE [DED CODE] IN (1, 2, 3)
GROUP BY EMPLOYEE_ID
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
If you are pulling totals from same column under different Column Ids and want to pt them in the same row, but under two separate columns.
EX.
Select EMPLOYEE_ID,
SUM (TAXWAGES) AS TAX AMOUNT,
SUM( TAXWAGES AS ) STATE TAX
From TABLE A
WHERE DED CODE IN (1, 2, 3)
Select EMPLOYEE_ID,
SUM (TAXWAGES) AS [TAX AMOUNT],
SUM( TAXWAGES) AS [STATE TAX]
From TABLE A
WHERE [DED CODE] IN (1, 2, 3)
GROUP BY EMPLOYEE_ID
Hi @Jenn W
From the query you gave an example, your query juxtaposes the EMPLOYEE_ID and the sum function, which will give an error and you need to group the EMPLOYEE_ID.
Jingyang Li has given the modified query, you can try it.
Best regards,
Percy Tang