Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/ * * * * * * * * * * * * * * * * * * Module 6 : More SQL INFO
Module : More SQL
INFO
Written by Lisa Thoendel
Last Updated Summer
Use the PetOwners create script to answer these questions.
We will use the below area to write our test SQL
Join pet owners and breeds together with a natural join and select all rows.
How are the rows matched? type your response here
A:
Now let's look at an inner join. Write a query to show the owner's ID name and their pets' IDs.
Next we'll add in the pets! List all the pet IDs and names with their owners.
What types of pets are and aren't owned by our owners? Use an outer join to show
a listing of types with all the pets assigned. Make sure to include types with no
pets
By using the NOT IN operator, we can target a list of types that are
not owned. List only those types.
Use the IN operator to show what breeds Beth ownerID owns.
Show the same result by using EXISTS.
Build a master list showing each owner and the pets they own.
Include the type and breed names.
This brings our whole schema together!
Build a view based on # called FurBabies.
Query the FurBabies view for the nonfurry fish or bird pets.
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