0

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

1
  • Also, MySQL doesn't have schema names (AFAIK) so the route to your db / table will be dbName.tableName (ie, no dbo) Commented Oct 29, 2013 at 5:04

1 Answer 1

3

Remove []

SELECT SALARY,BONUS,COMM,
SUM (SALARY + BONUS + COMM) AS 'Total Compensation'
FROM databaseName.Employee
WHERE ED_LVL >= 16
GROUP BY SALARY,BONUS,COMM
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.