Question

Question 1 5 pts • Using the Sakila database, write a query that shows the first name and last_name of actors that have not a
Question 2 5 pts Using the Sakila database, write a query that shows the film title and category name corresponding to the fi
Question 3 5 pts • Using the Sakila database, write a query that shows the number of films per rating that have special_featu
Question 4 O pts • BONUS - 10 points possible Using the Sakila database, write a query to show the customers first_name, last
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Q1. Select first_name, last_name from actor where actor_id not in (select actor_id from film_actor);

Q2. Select f.title, ifnull(c.name, "Unknown") from film f left join film_category fc on (f.film_id = fc.film_id) left join category c on (c.category_id = fc.category_id);

Q3. Select rating, count(*) from film where special _features ="Commentaries" group by rating;

Q4. Select c.first_name, c.last_name, sum(f.rental_rate - p.amount) from customer c inner join payment p on (c.customer_id = p.customer_id) inner join rental r on (r.rental_id = p.rental_id and r.customer_id = c.customer_id) inner join inventory i on (i.inventory_id = r.rental_id) inner join film f on (f.film_id = i.film_id) where f.rental_rate > p.amount group by c.first_name, c.last_name;

Add a comment
Know the answer?
Add Answer to:
Question 1 5 pts • Using the Sakila database, write a query that shows the first...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Using the Sakila database, write a query that shows the first_name and last_name of actors...

    1. Using the Sakila database, write a query that shows the first_name and last_name of actors that have not appeared in a film. 2. Using the Sakila database, write a query that shows the film title and category name corresponding to the film. If the category is null, display “Unknown” rather than null. 3. Using the Sakila database, write a query that shows the number of films per rating that have special_features with commentaries. 4. Using the Sakila database, write...

  • Using the Sakila database: Create a query that lists the following information for films: title, description,...

    Using the Sakila database: Create a query that lists the following information for films: title, description, rental_duration, rental_rate, length, category, number of copies of film in inventory.

  • SQL Queries – in this assignment you will be asked to create several SQL queries relating...

    SQL Queries – in this assignment you will be asked to create several SQL queries relating to the Sakila database that we installed in class. You may freely use DBeaver to create these queries, but I will expect your solution to show me the SQL code to answer or complete the tasks below. Write a query that produces the last name, first name, address, district, and phone number for every customer in the customer table. (You don’t need to include...

  • Consider the table actor which already exists in our database, with 200 rows. Upon executing SHOW...

    Consider the table actor which already exists in our database, with 200 rows. Upon executing SHOW CREATE TABLE `actor`, we get the following: CREATE TABLE `actor` ( `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `first_name` varchar(10) NOT NULL, `last_name` varchar(10) NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`actor_id`), KEY `idx_actor_last_name` (`last_name`) ) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8 You will need this table for any questions below which refer to an `actor` table. 1. Using the actor...

  • Write query using (USE ONLY SUBQUERIES) to find first name and last name of all customers that have rented a “music” movie order by last name.

    Write query using (USE ONLY SUBQUERIES) to find first name and last name of all customers that have rented a “music” movie order by last name. Using Sakila database

  • In this assignment you will combine HTML, PHP, and SQL in order to create a web...

    In this assignment you will combine HTML, PHP, and SQL in order to create a web form that allows a manager to add films to the sakila database. You will also create a method to allow the manager to view a list of all films along with their related information, and a list of actors in the movies. Task 1 Create an initial HTML page titled manager.html with 2 buttons. The first button will be labeled “View Films”, and the...

  • For each question, write a SQL query and save it as a "sql" file using a...

    For each question, write a SQL query and save it as a "sql" file using a different query 2, etc. Please execute these queries sequentially name, for example, query1.query product id (PK) category brand production_cost (Not Null) (FK) name (Not Null) Toothpaste Supermarket 1 Multivitami Supermarket 2 Shampoo acket T-shirt Supplements Supermarket Department4 Department5 Pharmacy Pharmacy 6 6 10 Query1. Update the Product table by adding another column as shown above ucts (name) with uery2. Retrieve all the uction cost...

  • Please help me to solve Please, No handwriting COURSE; introduction to database Q- write a query ...

    Please help me to solve Please, No handwriting COURSE; introduction to database Q- write a query SQL by Using the info below A. Normalize the Tables (in 3NF at least) B. Create the Normalized Tables and Populate them with at least 5 Rows C. Write the Wholesale Management System requested Queries & Execute them VERY IMPORTANT Screenshots from MySQL (or any other software you use) of all the tables after queries result. - Database system for a Wholesale Management System...

  • please any on can help me with this question the question is: Using the view s18h7z,...

    please any on can help me with this question the question is: Using the view s18h7z, write a function S18h7_4 that counts the number of films in a category within a specific range of number of actors. It takes three parameters: 1. Category: the name of a category 2. min_actors: the minimum number of actors a film must have in order to be counted. 3. min_actors: the maximum number of actors a film must not exceed in order to be...

  • 2. SQL queries (40 points total, 5 points each query) Write SQL query statements to query...

    2. SQL queries (40 points total, 5 points each query) Write SQL query statements to query the following Hotel Room Booking Database Tables. "cid" is Customer ID. "rid" is Room ID. "bid" is Booking ID. "dob" means Date of Vwwww Birth; "beds" means the number of beds in the room which is normally 1 or 2 beds. "DueDate" and "DueAmount" are the payment due dates and due amounts of this booking. Customers fname name phone email cid dob zipcode Rooms...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT