Reputation: 15
Don't really know MYSQL well just trying to transfer this SQLSERVER code to work in MYSQL
Select [SALARY],[BONUS],[COMM],
SUM (SALARY + BONUS + COMM)AS
'Total Compensation'
FROM [Enterprise].[dbo].[Employee]
Where ED_LVL >= '16'
group by [SALARY],[BONUS],[COMM]
I obviously switched the tables name to fit mysql
Upvotes: 0
Views: 1510
Reputation: 46900
Remove []
SELECT SALARY,BONUS,COMM,
SUM (SALARY + BONUS + COMM) AS 'Total Compensation'
FROM databaseName.Employee
WHERE ED_LVL >= 16
GROUP BY SALARY,BONUS,COMM
Upvotes: 3