Task 2 Queries with constraints Flashcards
1
Q
Find the movie with a row id of 6
A
SELECT id, title FROM movies
WHERE id = 6;
2
Q
Find the movies released in the years between 2000 and 2010
A
SELECT title, year FROM movies
WHERE year BETWEEN 2000 AND 2010;
3
Q
Find the movies not released in the years between 2000 and 2010
A
SELECT title, year FROM movies
WHERE year < 2000 OR year > 2010;
4
Q
Find the first 5 Pixar movies and their release year
A
SELECT title, year FROM movies
WHERE year <= 2003;