Movies where special_features is NULL
SELECT * FROM film
WHERE special_features IS NULL;Movies where rental duration > 7 days
SELECT * FROM film
WHERE rental_duration > 7;Movies with rental rate = 4.99 and replacement cost > 20
SELECT * FROM film
WHERE rental_rate = 4.99
AND replacement_cost > 20;Movies with rental rate = 0.99 OR rating = 'PG-13'
SELECT * FROM film
WHERE rental_rate = 0.99
OR rating = 'PG-13';First 5 movies sorted by title
SELECT * FROM film
ORDER BY title ASC
LIMIT 5;Skip first 10, get next 3 highest replacement cost
SELECT * FROM film
ORDER BY replacement_cost DESC
LIMIT 3 OFFSET 10;Movies with rating G, PG, PG-13
SELECT * FROM film
WHERE rating IN ('G', 'PG', 'PG-13');Movies with rental rate between 2 and 4
SELECT * FROM film
WHERE rental_rate BETWEEN 2 AND 4;Movies with title starting with 'The'
SELECT * FROM film
WHERE title LIKE 'The%';First 10 movies with conditions
SELECT * FROM film
WHERE rental_rate IN (2.99, 4.99)
AND rating = 'R'
AND title LIKE '%Love%'
LIMIT 10;Movies where title contains %
SELECT * FROM film
WHERE title LIKE '%\%%' ESCAPE '\';Movies where title contains _
SELECT * FROM film
WHERE title LIKE '%_%' ESCAPE '\';Titles start with A or B and end with s
SELECT * FROM film
WHERE (title LIKE 'A%' OR title LIKE 'B%')
AND title LIKE '%s';Titles containing Man, Men, or Woman
SELECT * FROM film
WHERE title LIKE '%Man%'
OR title LIKE '%Men%'
OR title LIKE '%Woman%';Titles containing digits
SELECT * FROM film
WHERE title ~ '[0-9]';Titles containing backslash ()
SELECT * FROM film
WHERE title LIKE '%\%';Titles containing Love or Hate
SELECT * FROM film
WHERE title LIKE '%Love%'
OR title LIKE '%Hate%';First 5 movies ending with er, or, ar
SELECT * FROM film
WHERE title LIKE '%er'
OR title LIKE '%or'
OR title LIKE '%ar'
LIMIT 5;
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)