Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/ * * * * * * * * * * * * * * * * * * Module 6 : More SQL INFO

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

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

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

Name the main mineral groups, based on composition.

Answered: 1 week ago