Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#1In the Analysis database, write 2 queries that join the zipcensus table with the zipcounty table based on their appropriate keys. In the first query

#1In the Analysis database, write 2 queries that join the zipcensus table with the zipcounty table based on their appropriate keys. In the first query use an inner join and in the second query use a full outer join. In addition to providing the queries, provide a screen shot in a word document of the Execution Plan of the query that has the lower overall Estimated Subtree Cost of the two.

#2 In the Analysis database provide a list of customer first names, the zip code of their order, and the state of their order using the customers and orders tables. Also include an additional column for the population (totpop) of the zip code that their order was placed in from the zipcensus table. If there is not a population value for that zipcode (aka null) then use a case statement to return 0 instead. -- Limit the results only to orders from Montana .

#3 In the Analysis database, write an SQL Query to return a count of products for each group name that are in stock and a count for those that are out of stock using a single query.

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_2

Step: 3

blur-text-image_3

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

11.4 Identify and evaluate methods used to treat schizophrenia.

Answered: 1 week ago

Question

In what ways can transitions be established? [LO-6]

Answered: 1 week ago

Question

How does an abstract word differ from a concrete word? [LO-4]

Answered: 1 week ago