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

Development Tools

String Functions Challenge 2 of 3

The Challenge: 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 username in parentheses.

My response code: SELECT CONCAT(first_name " (", LOWER(username), ")") AS display_name FROM users;

The Results are showing up as

  • display_name
  • Ben (bendog24)
  • Pasan (pa$anthebusinessman)

But I'm still being told "Bummer! There's something wrong with your query."

Any thoughts?

4 Answers

Never mind! I discovered I was providing an unnecessary LOWER keyword since the username was already lowercased...

No worries i just removed the last comma in my code and it worked... as follows

SELECT CONCAT(first_name," (", (username),")") AS display_name FROM users;

SELECT CONCAT(first_name," (", username,")",) AS display_name FROM users;

Above is my code i am still not able to get through this task since last night, HELP!

looks like you have an extra comma in your concat function

I spent a couple hours banging my head against a wall until I finally decided to check the forums and found this thread. My code worked in MySQL but not in the challenge and finally figured out why... MySQL doesn't care if your table names are upper or lower case when you call on them while the challenge does.