Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Databases SQL Reporting by Example Orientation: Selecting Data Orientation Quiz

DATABASES THIS IS THE CODE THAT NEEDED TO BE FILLED Return only students whose last name ends in 'x':

SELECT * FROM STUDENTS WHERE LAST_NAME ..........;

N I FILLED IT WITH "LIKE '%X%' " AND X% BUT STILL NO LUCK

Mark Miller
Mark Miller
45,831 Points

This has already been answered, but I'll add my comment anyway. The percent sign means "anything" in this SQL, so you can quote "anything x" to say anything could come first but x must be the last character. You've tried x before anything and anything before and after x. Make sure to quote "anything before x." This subject is called regular expressions or pattern matching if you want to dive in for more.

3 Answers

Hello there,

You're close - it's the one you haven't tried yet. To get names that end in 'x', you want

LIKE '%x'

The % is where the rest of the text goes, so if you're looking for things that end a certain way you want the % first.

thanks Katie

still bummer

One other problem I noticed is that the opening and closing quotes from an iPad are not being recognized, therefore consider using other gadgets or copying the quotes on another text