SQL - CONCAT & AS
Hello world, can someone help understanding whats wrong with my code? The error message is that apparently the «salary» column doesn't exist but it exist in the problem. See for yourself. The problem : The AS Keyword You are given the following staff table:contentImageThe salary shown in the table is monthly. Each employee receives a bonus once a year. The bonus for each employee is equal to their years of experience multiplied by 500. ***I can't copy/past the image but here are the 5 columns : «fisrtname», «lastname», «salary», «department», «experience» 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. Use the AS keyword and the CONCAT function! Here's my code : SELECT CONCAT ('fistname',',''lastname') AS fullname, CONCAT ((salary*12)+(experience*500)) AS total ORDER BY total;