
Select Queries from DVD Rental database
Film titles and rental rates (Aliased) SELECT title AS "Movie Title" , rental_rate AS "Rate" FROM film ; Customer names and emails (Aliased) SELECT first_name AS "First Name" , last_name AS "Last Name" , email FROM customer ; Films sorted by rental rate (DESC) and title (ASC) SELECT * FROM film ORDER BY rental_rate DESC , title ASC ; Actor names sorted by last name, then first name SELECT first_name , last_name FROM actor ORDER BY last_name , first_name ; Unique replacement costs SELECT DISTINCT replacement_cost FROM film ; Film title and length (Aliased) SELECT title , length AS "Duration (min)" FROM film ; Customer names and active status (Aliased) SELECT first_name , last_name , active AS "Is Active" FROM customer ; Film categories sorted alphabetically SELECT name FROM category ORDER BY name ASC ; Films by length (DESC) SELECT title , length FROM film ORDER BY length DESC ; Actor names sorted by first name (DESC) SELECT first_name , last_name FROM actor ORDER BY first_name DESC ; U
Continue reading on Dev.to
Opens in a new tab




