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

Kevin Williams
PLUS
Kevin Williams
Courses Plus Student 19,952 Points

From the users table, find all the usernames with the last_name of "Chalkley". Only return the usernames.

This is not really a question, but possibly and issue that may need to be addressed by help@teamtreehouse.com. If your doing your response to the answers you must have the query all on one line ie. SELECT * FROM books WHERE title = "Harry Potter"; Something like this will get you a connection error

SELECT * FROM book WHERE title = "Harry Potter";

Also this is the question for task 3 of 3 in the last section after the second video

From the users table, find all the usernames with the last_name of "Chalkley". Only return the usernames.

Based on how the question is phrased you may think this would be a possible answer SELECT usernames FROM users WHERE last_name = "Chalkley";

However the task validates with SELECT username FROM users WHERE last_name = "Chalkley";

which makes sense if you really think about it. Not sure if the word usernames is used to throw off the student when forming the query or that the question could be phrased in a different way.

Thanks for listening.

7 Answers

SQL Challenge Task 3 of 3

From the users table, find all the usernames with the last_name of "Chalkley". Only return the usernames.

SELECT username FROM users WHERE last_name = "Chalkley";

Nimish Chandola
Nimish Chandola
4,334 Points

its not workin i dun know why?

SELECT username FROM users WHERE last_name = "Ary de Oliveira";

Edward Lopez
Edward Lopez
5,998 Points

I completely agree with you on this comment. I almost missed it but only avoided it with the boldness of the "s" in usernames. My suggestion is below but it isn't the best in terms of grammar, without changing username to usernames.

Original: From the users table, find all the usernames with the last_name of "Chalkley". Only return the usernames. Updated: From the users table, find every username with the last_name of "Chalkley". Only return the usernames.

Good luck!

Thanks for posting Kevin! This only threw me off because of the "usernameS" word.

chase singhofen
chase singhofen
3,811 Points

i played around with the "s" in username, but my problem was i was using the * instead of just username i put * in it b/c i thought all = *

I also ran into the same issue but after going back over line by line i noticed i did not use a capital C for "Chalkley".