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

PHP

help me pls

Challenge Task 1 of 3

Note: We will be writing ONLY the SQL query for this challenge. In library database we have a People table. The columns are people_id and fullname. Use a wildcard character to find ALL people with the last name "Tolkien" Type in your command below.

3 Answers

Danny Massa
Danny Massa
27,856 Points

Hey Shawn,

The answer you're looking for is this - you need to select all from people where the fullname is like (wildcard) and last name

SELECT * FROM people WHERE fullname LIKE "%Tolkien";

thanks danny.

Cindy Lea
PLUS
Cindy Lea
Courses Plus Student 6,497 Points

I think the challenge uses last_name & not full_name? If so:

select last_name from people where last_name = "Tolkien"

You didnt attach challenge so I cant check

dosen't work cindy!

Note: We will be writing ONLY the SQL query for this challenge. In library database we have a People table. The columns are people_id and fullname. Use a wildcard character to find ALL people with the last name "Tolkien" Type in your command below. Get Help Check Work

SELECT last_name FROM People WHERE last_name = "Tolkien";

Single quotes work too SELECT * FROM people WHERE fullname LIKE '%Tolkien';