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 trialAlexander Ramadan
3,283 PointsDatabase Code Challenge for QUERYING Tables Challenge Task 4
For challenge task 4, it is asking me query for all actors named Tom but then is telling me there is no column for actors. Am I miss understanding the task?
Here is the task question
Select all actors whose name starts with "Tom".
3 Answers
Mohammed Hossen
5,591 Pointsyou have to use the key word 'like' and a wild card % at the end of Tom like so 'Tom%'
David Fife
8,808 PointsI'm actually having the same trouble
this is what I have SELECT actor FROM movies WHERE actor LIKE 'Tom%' ;
I have also tried actors
David Fife
8,808 PointsI figured it out, instead of having a movies table name, it has an actors table name
Ary de Oliveira
28,298 PointsChallenge Task 1 of 4 Select all movies from the year 2003. Type in your command below, then press Enter.
SELECT * FROM movies WHERE year= 2003;
Challenge Task 2 of 4 Select all movies released in the year 2009 and later. Type in your command below, then press Enter.
SELECT * FROM movies WHERE year >= 2009;
Challenge Task 3 of 4 Select all movies from the years 1999 to 2004. Type in your command below, then press Enter.
SELECT * FROM movies WHERE year BETWEEN 1999 AND 2004;
Challenge Task 4 of 4 Select all actors whose name starts with "Tom". Type in your command below, then press Enter.
SELECT * FROM actors WHERE name LIKE %Tom%;