- 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;
-
Unique ratings
SELECT DISTINCT rating FROM film;
-
Unique rental durations
SELECT DISTINCT rental_duration FROM film;
-
First unique customer ID based on active status
SELECT MIN(customer_id) AS customer_id, active FROM customer GROUP BY active ORDER BY customer_id;
-
Earliest rental date for each customer
SELECT customer_id, MIN(rental_date) AS rental_date FROM rental GROUP BY customer_id ORDER BY customer_id;
-
10 shortest films
SELECT title, length FROM film ORDER BY length ASC LIMIT 10;
-
Top 5 customers with highest IDs
SELECT first_name, last_name FROM customer ORDER BY customer_id DESC LIMIT 5;
-
Unique store IDs from inventory
SELECT DISTINCT store_id FROM inventory;
-
Unique replacement costs (Sorted ASC)
SELECT DISTINCT replacement_cost FROM film ORDER BY replacement_cost ASC;
-
First rental date for each store
SELECT store_id, MIN(rental_date) AS rental_date FROM rental JOIN inventory ON rental.inventory_id = inventory.inventory_id GROUP BY store_id ORDER BY store_id;
-
Unique film ratings sorted alphabetically
SELECT DISTINCT rating FROM film ORDER BY rating ASC;
-
Films by rating (ASC) and length (DESC)
SELECT * FROM film ORDER BY rating ASC, length DESC;
-
Actor names (Last Name ASC, First Name DESC)
SELECT first_name, last_name FROM actor ORDER BY last_name ASC, first_name DESC;
-
Films by replacement cost (ASC) and rental rate (DESC)
SELECT * FROM film ORDER BY replacement_cost ASC, rental_rate DESC;
-
Customer names (Last Name ASC, First Name DESC)
SELECT first_name, last_name FROM customer ORDER BY last_name ASC, first_name DESC;
-
Rentals (Customer ID ASC, Rental Date DESC)
SELECT * FROM rental ORDER BY customer_id ASC, rental_date DESC;
-
Films (Rental Duration ASC, Title DESC)
SELECT * FROM film ORDER BY rental_duration ASC, title DESC;
NUMBERING ISSUE IS THERE I ENTERED CORRECT BUT IT IS NOT CHANGING
























