+ 2

SELECT CONCAT (FirstName, ' , ' , LastName) AS fullname (salary*12)+(experience*500) AS total FROM staff

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.

30th Apr 2021, 10:13 PM
Elizabeth Makinde
7 Réponses
+ 1
Select CONCAT (firstname,' ', lastname) AS fullname, salary*12+experience*500 AS total From staff Order by total;
16th Aug 2021, 9:01 PM
Vitalii Zbroi
Vitalii Zbroi - avatar
0
Thank you
1st May 2021, 10:04 PM
Elizabeth Makinde
0
SELECT CONCAT (firstname,' ',lastname) AS fullname, salary*12+experience*500 AS Total FROM staff ORDER BY Total;
20th Jul 2022, 6:04 AM
Mered Mulugeta Wassie
Mered Mulugeta Wassie - avatar
0
I have done all this but the first name and last name comes out as fullname without space in between the first and last name Someone please explain further cause am new to this SQL and it's driving me nuts
30th Aug 2022, 6:04 AM
Chisom
0
SELECT CONCAT (firstname, ' , ' , lastname) AS fullname (salary*12)+(experience*500) AS total FROM staff ORDER BY total
9th Dec 2022, 5:22 PM
SURESH RAJPOOT
0
SELECT CONCAT (firstname, ' ' ,lastname) AS fullname ,salary*12+experience*500 AS total FROM staff ORDER BY total working
9th Dec 2022, 5:24 PM
SURESH RAJPOOT
- 1
SELECT CONCAT (FirstName, ' , ' , LastName) AS fullname (salary*12)+(experience*500) AS total FROM staff ORDER BY total;
30th Apr 2021, 10:14 PM
Elizabeth Makinde