Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework07 SQL Joins- You must use a JOIN for each of the following queries. In this assignment you will be asked to create several SQL

image text in transcribed

Homework07 SQL Joins- You must use a JOIN for each of the following 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 DBeaverto create these queries, but I will expect your solution to show me the SQL code to answer or complete the tasks below You should submit a SINGLE PDF document to your submission directory The PDF document should include a screenshot of your output for each question, as well as the query that created the output, and a count for the number of records returned by the query**. THE QUERY SHOULD BE PASTED AS TEXT SO I CAN COPY PASTE YOUR ANSWER!!!II If your query is an image file and I can't copy/paste it to test it I will count your answer WRONG!!! Many of these queries will have 100's of rows as a result. You do not need to capture ALL... just up to 10-15 rows to show your output is correct (**Note that you may need to set your maximum number of results to a higher number more than enough) 50000 will be MariaDB localhosi sakila 50000 MariaDB . localhost> Script-3G t-4- 1) Write a query that produces the first name, last name, address, district and postal code for all customers. (append to customers the information from address table) (LEFT JOIN) Write a query that produces address, district, city for all addresses. (RIGHT JOIN) Write a query that produces address, district, city, country for all Cities. Attach to the list of Cities every country and address Write a query that produces the title, rental rate, and language for all Action and Comedy Films (3 Inner Joins) Write a query that produces film title, description, and category for all films. (Inner Join) (note for #5 you will only get 1000 rows because the extra films we added in the last homework did not get an entry for category in the film category or category tables) 2) 3) 4) 5) http://stackoverflow.com/questions/4796872/full-outer-join-in-mysal seems to have a good comment describing the different joins. Apparently MySQL does not support a full outer join Document covered in class: http://www.sql-join.com/ Homework07 SQL Joins- You must use a JOIN for each of the following 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 DBeaverto create these queries, but I will expect your solution to show me the SQL code to answer or complete the tasks below You should submit a SINGLE PDF document to your submission directory The PDF document should include a screenshot of your output for each question, as well as the query that created the output, and a count for the number of records returned by the query**. THE QUERY SHOULD BE PASTED AS TEXT SO I CAN COPY PASTE YOUR ANSWER!!!II If your query is an image file and I can't copy/paste it to test it I will count your answer WRONG!!! Many of these queries will have 100's of rows as a result. You do not need to capture ALL... just up to 10-15 rows to show your output is correct (**Note that you may need to set your maximum number of results to a higher number more than enough) 50000 will be MariaDB localhosi sakila 50000 MariaDB . localhost> Script-3G t-4- 1) Write a query that produces the first name, last name, address, district and postal code for all customers. (append to customers the information from address table) (LEFT JOIN) Write a query that produces address, district, city for all addresses. (RIGHT JOIN) Write a query that produces address, district, city, country for all Cities. Attach to the list of Cities every country and address Write a query that produces the title, rental rate, and language for all Action and Comedy Films (3 Inner Joins) Write a query that produces film title, description, and category for all films. (Inner Join) (note for #5 you will only get 1000 rows because the extra films we added in the last homework did not get an entry for category in the film category or category tables) 2) 3) 4) 5) http://stackoverflow.com/questions/4796872/full-outer-join-in-mysal seems to have a good comment describing the different joins. Apparently MySQL does not support a full outer join Document covered in class: http://www.sql-join.com/

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions