Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Having a hard time with this one. Idk if they want me to make up my own strings or what?
Having a hard time figuring out what they want exactly.
This question is a little tricky. The main idea is to look at what the teacher wants to see returned in the query.
So reading the question, the teacher wants to see: Andrew Chalkley < firstname.lastname@example.org > and you're given column names.
We can see the first name, a space, the last name, another space a right angle bracket, an email, and a left angle bracket. Also, the teacher says to put it in this format so you can just use the column names and you don't have to worry about a specific name or email. Last, make sure you place all of the alias stuff inside the SELECT statement. The FROM statement should come afterward.
Your query should look more like this:
SELECT first_name || ' ' || last_name || ' <' || email || '>' AS to_field FROM patrons;
Jonathan GrieveTreehouse Moderator 91,252 Points
Try this query as it is
SELECT * FROM patrons first_name || "Andrew " || last_name || "Chalkley" || email || "email@example.com" AS to_field;
I think what may be happening is you have a trailing space in value for last name And also in the email field. I don't think it would necessarily affect the query too much in practice but the code challenge won't like it. :-)