
DB-TASK-Filtering Data
Hi everyone! Find all movies where the special features are not listed (i.e.,special_features is NULL). This query selects all movies where special_features column has no value (NULL). SELECT * FROM film WHERE special_features IS NULL; Find all movies where the rental duration is more than 7 days. selects movies whose rental duration is greater than 7 days. SELECT * FROM film WHERE rental_duration > 7; Find all movies that have a rental rate of $4.99 and a replacement cost of more than $20. this query selects movies that satisfy both rental_rate = 4.99 and replacement_cost greater than 20. SELECT * FROM film WHERE rental_rate = 4.99 AND replacement_cost > 20; Find all movies that have a rental rate of $0.99 or a rating of 'PG-13'. this query selects movies that satisfy either rental_rate = 0.99 or rating = 'PG-13'. SELECT * FROM film WHERE rental_rate = 0.99 OR rating = 'PG-13'; Retrieve the first 5 rows of movies sorted alphabetically by title. this query selects first 5 movies sorted
Continue reading on Dev.to
Opens in a new tab



