Question

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 a query to show the customers first_name, last_name and the amount paid in overage fees. The overage fees can be calculated by subtracting the payment amount from the rental rate of the film when the payment amount is greater than the rental rate.

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:
1. Using the Sakila database, write a query that shows the first_name and last_name of actors...
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
  • Question 1 5 pts • Using the Sakila database, write a query that shows the first...

    Question 1 5 pts • Using the Sakila database, write a query that shows the first name and last_name of actors that have not appeared in a film. Question 2 5 pts 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. Question 3 5 pts • Using the Sakila database, write a query that shows the number of films per rating...

  • 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...

  • 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...

  • The relations are: ● ACTOR (actor_id, first_name, last_name, last_update) ● LANGUAGE (language_id, name, last_update) ● CATEGORY...

    The relations are: ● ACTOR (actor_id, first_name, last_name, last_update) ● LANGUAGE (language_id, name, last_update) ● CATEGORY (category_id, name, last_update) ● FILM (film_id, title, description, release_year, language_id, length, rating, last_update) ● FILM_ACTOR(actor_id, film_id, last_update) ● FILM_CATEGORY (film_id, category_id, last_update) ● COMMENTS (review_id, film_id, reviewer_name, comment, score, last_update) (5 points) Retrieve the title of all the Movies in Italian and without actors with first name “JOHN”, ordered alphabetically. This is my current SQL select film.title from film join language on film.language_id =...

  • 1) Write SQL to return the first and last name of all actors with a first...

    1) Write SQL to return the first and last name of all actors with a first name of "ADAM" (use the ACTOR table) 2) Write SQL with the LIKE operator to return addresses that are in the "Dhaka" district and have street addresses that do not contain the character sequence "Loop". You can return all information from the ADDRESS table that matches this criteria. 3) Write SQL with the BETWEEN and ORDER BY clause to return the payments in descending...

  • 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 help me on the SQL queries, thank you so much. Write a query to display the title and publisher as well as the p...

    Please help me on the SQL queries, thank you so much. Write a query to display the title and publisher as well as the publisher contact for each book using JOIN...USING clause. Write a query to show the first and last names of customers who have ordered cooking books. Use the WHERE clause to join the tables. Write a query to show the title, cost and ISBN of each book in the books table. If the book has been ordered,...

  • 1.) Using MS SSMS, create a new query file (sql) and write and execute SQL statements...

    1.) Using MS SSMS, create a new query file (sql) and write and execute SQL statements to insert at least five records in each table, preserving all constraints. Put in enough data to demonstrate how the database will function [name the file PopulateDBWithData.sql]. 2.) Using MS SSMS, create a new query file (sql) and write SQL statements that will process five non-routine requests for information from the database just created. For each, write the request in English (using the --...

  • Write MySQL query statements for the questions below including the output that proves the accuracy of...

    Write MySQL query statements for the questions below including the output that proves the accuracy of your solution. Your answers should be stored in a text file that captures your interaction with MySQL. 1. Find the movieID, title, year and DVDPrice of all movies where the DVD-Price is equal to the discountPrice. 2. Find the actorID, lastName, firstName, middleName, and suffix of all actors whose middleName is not NULL. 3. Suppose you remember a movie quote as “Play it again,...

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
ADVERTISEMENT