
task -002
Movies where special_features is NULL SELECT * FROM film WHERE special_features IS NULL; Explanation: Here I am checking for NULL values. We cannot use = for NULL, so I used IS NULL. Rental duration more than 7 days SELECT * FROM film WHERE rental_duration > 7; Explanation: Filtered movies where rental duration is greater than 7. Rental rate = 4.99 and replacement cost > 20 SELECT * FROM film WHERE rental_rate = 4.99 AND replacement_cost > 20; Explanation: Used AND because both conditions must be true. Rental rate = 0.99 OR rating = 'PG-13' SELECT * FROM film WHERE rental_rate = 0.99 OR rating = 'PG-13'; Explanation: Used OR because any one condition is enough. First 5 movies sorted by title SELECT * FROM film ORDER BY title LIMIT 5; Explanation: Sorted by title and took first 5 rows. Skip 10 rows, next 3 highest replacement cost SELECT * FROM film ORDER BY replacement_cost DESC OFFSET 10 LIMIT 3; Explanation: Sorted by highest cost, skipped first 10, then took next 3. Rating is G, PG,
Continue reading on Dev.to Beginners
Opens in a new tab


