Back to articles
Bonus Q/A
News

Bonus Q/A

via Dev.to TutorialSandhya Steffy M

1. SELECT title, special_features FROM film WHERE special_features IS NULL; This question is asking us to find movies where no special feature is given at all. So instead of checking for empty text, we use IS NULL because NULL means “no value stored”. 2. SELECT title, rental_duration FROM film WHERE rental_duration > 7; Here we only want movies whose rental duration is greater than 7 days. So we simply filter the rows using the > operator. 3. SELECT title, rental_rate, replacement_cost FROM film WHERE rental_rate = 4.99 AND replacement_cost > 20; This question has two conditions, and both must be true at the same time. That is why we use AND to combine rental rate and replacement cost. 4. SELECT title, rental_rate, rating FROM film WHERE rental_rate = 0.99 OR rating = 'PG-13'; Here the movie can satisfy either one condition or the other. So we use OR because even if one part matches, the row should come. 5. SELECT title FROM film ORDER BY title ASC LIMIT 5; First, the movies must be ar

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
0 views

Related Articles