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 trialJames Kraai
26,167 PointsMySQL String Functions Challenge 2 of 3
I've been stuck on this for a while now, I must be missing something silly.
The task is
Select the "first_name" followed by the username in parentheses and alias it as "display_name". For example "Andrew (chalkers)". There's a space between the end of the first_name and the username in parentheses.
MySQL statement is...
SELECT CONCAT(first_name, " (", username, ") ") AS display_name FROM users;
and it returns
- display_name
- Ben (Bendog24)
- Pasan (Pa$anTheBusinessman)
but I'm told something is wrong with my query
Thoughts? Thanks in advance!
2 Answers
Dino Paškvan
Courses Plus Student 44,108 PointsYou have a space after the final parenthesis, and it shouldn't be there.
James Kraai
26,167 PointsSpot on thank you!