Welcome to the Treehouse Community
Looking to learn something new?
Madhuri MaddalaCourses Plus Student 793 Points
Create a report from the customers table that shows their first initial of their first name and alias it as initial. Sel
Create a report from the customers table that shows their first initial of their first name and alias it as initial. Select their last name too.
Benjamin Larson34,055 Points
Your SUBSTR function is correct, but you don't need the concatenation operators (||) or the string (" ") in this example. Also, there are two column you are selecting: the first letter of the first_name, and the last_name. SQL syntax requires you to put a comma between each column you are selecting. The way you have it written now, SQL doesn't understand because it's missing the comma and your alias to "intial" (which needs to be "initial"), is being associated with last_name, not the substring of the first_name.
Hopefully this makes sense and you can take another stab at it. If not, feel free to ask more questions.
SELECT SUBSTR(first_name, 1, 1), last_name AS "initial" FROM customers;. Can someone please help with this one. I can't seem to get it.
It asks to make the first_name an alias, then add the last_name SELECT SUBSTR(first_name, 1, 1) AS initial , last_name AS last_name FROM customers;