Question
NEED SQL COMMANDS FOR: 1. Using the payment table find all of the payments made by customer 7 (you will get one number). 2. Using
NEED SQL COMMANDS FOR:
1. Using the payment table find all of the payments made by customer 7 (you will get one number).
2. Using the actor table, find ALL of the actors that have the first name Ed. List the actor id, first name, and last name in ascending order by last name.
3. Using the Country table, count the number of countries in the list (you will get 1 number).
4. Using the Film table, find out how many rentals had a rental duration of 5 or more days, and list the films Title, Description, and the number of days rented. Sort by title, ascending.
5. Using the Film category table, find out how many films had a category ID of 14 (you will get 1 number).
6. Using the Rental table, select all rentals that occurred before 08-01-2005. List Rental_Date, Inventory_ID, Customer_ID and Staff_ID. Order by Customer_ID then by Rental_Date.
7. Using the Customer and the Address table (you will need to Join the tables), list the customer_id, first_name, last_name, address, district, city_id, postal_code, phone, and email. Join on the address_id from both tables. Order by last_name then first_name.
8. Using the Customer and the Address table (you will need to Join the tables), list the customer_id, first_name, last_name, address, district, city_id, postal_code, phone, and email for those customers that live in California. Join on the address_id from both tables. Order by last_name then first_name.
9. Using the Customer and the Address table (you will need to Join the tables), list the customer_id, first_name, last_name, address, district, city_id, postal_code, phone, and email where the city_id is greater than 500. Join on the address_id from both tables. Order by city_id.
10. Using the actor and film_actor table, join using the actor_id field from both tables. List the actor_id, first_name, last_name, and film_id. Order by film_id, actor_id
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started