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 trialmarika devan
4,780 PointsSelect all movies that have data in the "year" column.
This is my code. What a I doing wrong?
SELECT*FROM movies WHERE year IS NOT NULL ORDER BY year;
4 Answers
Mischa Yartsev
20,562 PointsHi marika, For my opinion your doing absolutely right, and when I completed that challenge I did the same. But the challenge builders thought differently ;) In this challenge you only need to query year IS NOT NULL without ordering it by year, like this:
SELECT * FROM movies WHERE year IS NOT NULL;
MUZ140970 Shaune Muringani
11,962 PointsSELECT * FROM movies WHERE year IS NOT NULL; this should work.
Ary de Oliveira
28,298 PointsDATABASE FOUNDATIONS.
Challenge Task 1 of 2
Select all movies with the "year" column that hasn't been populated yet. Type in your command below, then press Enter.
SELECT * FROM movies WHERE year IS NULL;
Challenge Task 2 of 2
Select all movies that have data in the "year" column. Type in your command below, then press Enter.
SELECT * FROM movies WHERE year IS NOT NULL;
Ary de Oliveira
28,298 PointsDATABASE FOUNDATIONS.
Challenge Task 1 of 2
Select all movies with the "year" column that hasn't been populated yet. Type in your command below, then press Enter.
SELECT * FROM movies WHERE year IS NULL;
Challenge Task 2 of 2
Select all movies that have data in the "year" column. Type in your command below, then press Enter.
SELECT * FROM movies WHERE year IS NOT NULL;