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

Databases

Task Patrons: retrieving email with brackets

I do not know what i did wrong in my code. Any comments are appreciated.

1 Answer

Steven Parker
Steven Parker
230,248 Points

You forgot to link to the course or share your code. But this is a frequently asked-about topic, so I can repeat the answer given for a previous post.

You'll combine literal strings and columns by concatenation. For the playground this is done with the || operator.

So you'll have something like this:

SELECT first_name || ' ' || last_name || ' <' || email || '>' AS combined_name FROM table_name;

The combined_name is an alias for the column heading, if they asked for a specific one just replace it. And of course replace table_name with the actual name of the table.