0
SQL annual bonus salary challenge
I am having trouble getting the $500 bonus to multiply by the number years. I keep getting the correct results as far as columns and I get an output but it’s only adding 500 to salary and creating the “total” string based on that. It’s not multiplying by number of years experience. Here has what I have: SELECT CONCAT (firstname, ' ', lastname) AS fullname, salary + experience * 500 AS total FROM staff ORDER by total;
6 Respuestas
+ 3
Karsa9Fingers
Here should be
(salary * 12) + 500 * experience
+ 2
ok in reviewing it seems like the math is incorrect on the part of sololearns solution - anyone else encounger this?
+ 2
I Am AJ !
just solved it with the following code:
SELECT CONCAT (firstname, ' ', lastname) AS fullname, salary*12+500*experience AS total FROM staff ORDER by total;
thank you kindly good sir.
+ 1
ohhh so salary column is monthly? did i miss that in the instructions?
+ 1
SELECT CONCAT (firstname, ' ' ,lastname) AS fullname,
(salary*12)+(experience*500) AS total
FROM staff
ORDER BY total ;
0
Karsa9Fingers jumping in here 2 months late because there was nothing on here that said this was a monthly salary. ive been stuck on this for like 15 minutes.