Movies where special_features is NULL:-
SELECT * FROM film WHERE special_features IS NULL;Movies with rental duration > 7 days:-
SELECT *FROM film WHERE rental_duration > 7;Rental rate = 4.99 AND replacement cost > 20
SELECT *FROM film WHERE rental_rate = 4.99 AND replacement_cost > 20;Rental rate = 0.99 OR rating = 'PG-13':-
SELECT * FROM film WHERE rental_rate = 0.99 OR rating = 'PG-13';First 5 movies sorted alphabetically:-
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 OFFSET 10 LIMIT 3;Rating in ('G', 'PG', 'PG-13'):-
SELECT * FROM film WHERE rating IN ('G', 'PG', 'PG-13');Rental rate between 2 and 4:-
SELECT * FROM film WHERE rental_rate BETWEEN 2 AND 4;Titles starting with "The":-
SELECT * FROM film WHERE title LIKE 'The%';First 10 movies with multiple conditions
SELECT * FROM film WHERE rental_rate IN (2.99, 4.99) AND rating = 'R' AND title LIKE '%Love%' LIMIT 10;Titles containing %:-
SELECT *FROM film WHERE title LIKE '%\%%' ESCAPE '\';Titles containing _
SELECT * FROM film WHERE title LIKE '%_%' ESCAPE '\';Titles start with A or B and end with s:-
SELECT * FROM film WHERE (title LIKE 'A%s' OR title LIKE 'B%s');Titles containing Man, Men, or Woman:-
SELECT * FROM film WHERE title ILIKE '%Man%' OR title ILIKE '%Men%' OR title ILIKE '%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 ILIKE '%Love%'
OR title ILIKE '%Hate%';First 5 movies ending with er, or, ar
SELECT *FROM filmWHERE 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)