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


WRONG Question or WRONG Answer

SELECT * FROM phone_book WHERE last_name IS NOT NULL;

Which challenge are you on?

3 Answers

Hi Sorie,

Are you answering Filtering Out or Finding Missing Information, Challenge Task 2 of 2

"We're still using the phone_book, with the columns id, first_name, last_name and phone.

Imagine we're implementing the autocomplete feature for a search facility on the phone where a user can start typing a last name and suggestions will appear. Write a query to retrieve all values from the last name column where the last name value is present. Only retrieve the last_name column."

In which case it is asking you to only select the last_name column, not all of them.

Sobin Sebastian
Sobin Sebastian
5,348 Points

SELECT last_name FROM phone_book WHERE last_name IS NOT NULL;

It specifically says "Only retrieve the last_name column"

Thanks guys! Not my question, but was about to ask the same one. Details, they're important! :)