+ 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
Natalie Otero - avatar
15 Answers
+ 7
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
Elisa Vieira - avatar
+ 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
Simba - avatar
+ 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
Natalie Otero - avatar
+ 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
Reena Bharath - avatar
+ 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
Elisha Makeseni - avatar
+ 1
SELECT firstname, lastname, experience*500 as total FROM staff ORDER BY total DESC Expected Output firstname,lastname,total Seth,Gray,3000 David,Gibson,1500 Lisa,Anderson,1500 John,Smith,1000 Nelson,Gross,500
16th Dec 2022, 6:43 PM
Olga Lorents
Olga Lorents - avatar
0
The code above is the best i came up with
8th Mar 2021, 5:37 AM
Natalie Otero
Natalie Otero - avatar
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
MAXIM PRUDNIKOV - avatar
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
Ifthiyaz Ahamed - avatar
0
SELECT CONCAT (firstname,' ',lastname)as fullname, (salary*12)+(experience*500) as total FROM STAFF ORDER BY total
25th Aug 2022, 6:47 PM
Randrianantenaina José Roland
Randrianantenaina José Roland - avatar
0
This is correct try thi code select * from Employees order by Salary DESC limit 3
26th Mar 2023, 7:31 AM
Akshay sayambar
Akshay sayambar - avatar
0
Use this code and process further. SELECT CONCAT (firstname,' ',lastname) as fullname from staff, CONCAT (salary*12+experience*500) as total from staff order by total
4th Sep 2023, 12:37 PM
Rahul Deshwal
Rahul Deshwal - avatar
0
SELECT firstname, lastname, experience*500 as total FROM staff ORDER BY total DESC ONLY THIS WORKED
6th Feb 2024, 10:22 AM
Prostibozenko Ilja
Prostibozenko Ilja - avatar