+ 1

# I cant solve this practice test for days now, plz someone help!

Each employee receives a bonus once a year. The bonus for each employee is equal to their years of experience multiplied by 500. Write a query to output the firstname and lastname columns into one column named fullname separated by space, and the total annual salary for each employee keeping in mind bonuses named 'total'. Sort by the 'total' column

8th Mar 2021, 5:36 AM
Natalie Otero
+ 6
After trying a lot, I've got this and worked: SELECT CONCAT (firstname,' ',lastname)as fullname, (salary*12)+(experience*500) as total FROM STAFF ORDER BY total
31st Mar 2021, 7:08 PM
Elisa Vieira
+ 3
You need to use CONCAT instead of SELECT in your 3rd line. SELECT CONCAT (firstname,' ',lastname) as fullname from staff; CONCAT (salary*12+experience*500) as total from staff; order by total;
8th Mar 2021, 6:20 AM
Simba
+ 2
SELECT CONCAT (firstname,' ',lastname) as fullname from staff; SELECT ((salary*12)+(experience*500)) as total from staff; order by total
8th Mar 2021, 5:38 AM
Natalie Otero
+ 2
SELECT CONCAT (firstname,' ',lastname)as fullname,((salary*12)+(experience*500)) as total from staff order by total;
26th Aug 2021, 9:23 AM
Assefa Demses
+ 1
Answer is : SELECT CONCAT (firstname,' ',lastname) as fullname, (salary*12)+(experience*500) as total FROM STAFF ORDER BY total; And it worked :)
10th Apr 2021, 8:07 PM
Reena Bharath
+ 1
SELECT CONCAT (firstname, lastname) as fullname, (salary*12)+(experience*500) as total FROM staff ORDERED BY total;
3rd Dec 2021, 5:25 PM
Elisha Makeseni
0
The code above is the best i came up with
8th Mar 2021, 5:37 AM
Natalie Otero
0
Good day, please can anyone explain where the 12 is coming from?
30th Apr 2021, 9:58 PM
Elizabeth Makinde
0
SELECT concat (firstname, ' ' ,lastname) AS fullname, ((salary*12)+(experience*500)) as total from staff order by total;
17th Jun 2021, 2:37 PM
MAXIM PRUDNIKOV
0
this is the correct answer SELECT CONCAT (firstname,' ',lastname)as fullname, (salary*12)+(experience*500) as total FROM STAFF ORDER BY total
4th Aug 2022, 4:28 AM
Ifthiyaz Ahamed
0
SELECT CONCAT (firstname,' ',lastname)as fullname, (salary*12)+(experience*500) as total FROM STAFF ORDER BY total
25th Aug 2022, 6:47 PM