Michael Martin5,739 Points
This statement works in SQL Playground, aliasing three values as to_field, what am I doing wrong with this question?
select first_name || " " || last_name || " " || "<" || email || ">" as "to_field" from patrons where first_name = "Andrew"
What is wrong with this query? if I change the variables around, it works just fine in the playground, am I misunderstanding what to alias it to/as?
Charlie Harcourt8,029 Points
You've got a "" in between the last_name and the '<' where there shouldn't be one. In the playground it wont matter as it will just bring back the results. However, in the task it is asking for specific results so it will see that extra space and automatically think it's wrong.
try and compare your task to this. I have tested the code below and know this works.
SELECT first_name || " " || last_name || ' <' || email || '>' AS to_field FROM patrons;