Prodcts The Nectbuodoattadera database contains sales data for a fictitious company called Northwind Traders, which imports and exports specialty foods from around the world and resales their products to restaurants and other retailers. A Comp Co e database diagram is provided below. Order Detis Corteri A Instructions: Write SQL queries that will provide the answers to the following questions. Modify this document by pasting in an image of your SQL Query after each question it answers. Make sure you clearly show all the SQL (wrap long lines to a new line) and the results that are generated like in the example at the right. SELECT Caty FROM Bowlers The number of rows in the bottom right ategories corner should be clearly visible and at least the first 10 results rows. Turn your modified Word document into D2L. Reaion 1. From the Products table, list the name of each discontinued product and the total value of the inventory of that product that we currently have on hand and give it an appropriate column name. Only list discontinued products and only list them if the total inventory value is greater than zero. Show your list with the highest inventory value first. • Discontinued products are determined by the Discontinued column value (0 = Active, 1 = Discontinued) • The total value of inventory we have on hand is calculated by (UoitPrice * yoitslostock) Gustomen Caron EmoloveeTeritories Cot Cota A Territaries Orders lee le on 2. From the Products table, list the CatesondR and the total number of different products of that category that have not been discontinued (Discontinued = 0). Provide an appropriate column name for the total number of products and sort your list with the category with the fewest products first. hae C Employees 3. From the Orders table, list the SustomerR and the total amount of money that customer spent on Freight for Le their orders that were shipped in 2019. The Freight column holds the Freight Cost for each order. Only list customers who spent at least $2,000 on freight that year. Sort your list by SustemeriD. sec 4. On the Employees table, list the name of each country where the employees live and the number of employees who live in that country. GustomeCuatomerDemo A 5. Using the QrderDetails table, list the ProdustiD, the total number of orders that product was included in, and the maximum discount amount on any order of that product. Provide appropriate column names for the number of orders and maximum discount amount. Only include products where the Maximum Discount Amount for that product was greater than $1,000. aae GustomeDemearaohics Hint: Shipen • The total price before discount is the quantity multiplied by the unit price. • The discount is a decimal value. For example, it may be .15 to mean a 15% discount rate. • The discount amount is the total price before discount multiplied by the discount. Cu nle

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please solve questions in screenshot

Suppliens
The Northwind Traders database contains sales data for a fictitious company called Northwind Traders, which imports
Products
7 Pedu
t0
Companym
and exports specialty foods from around the world and resales their products to restaurants and other retailers. A
database diagram is provided below.
Padfe
Cantademe
Order Details
Spper
CantadTie
7 Pratuc
Instructions: Write SQL queries that will provide the answers to the following questions.
Quntiyerhit
City
Unihice
gan
Quantity
Modify this document by pasting in an image
Lhinak
Post Cade
O
BSELECT
Dn
Cantry
of your SQL Query after each question
it
FROM Bowlers
ndertl
Phane
answers. Make sure you clearly show all the
Chaninund
SQL (wrap long lines to a new line) and the
results that are generated like in the
Hama
example at the right.
e
The number of rows in the bottom right
de e t taea
NAL
o
tte Te
Categories
? Cap
corner should be clearly visible and at least
Fa te AL
tav
the first 10 results rows.
he Se
N Sete a
Caegonyeme
Pe
Fo N HAL
Dception
tat F
Turn your modified Word document into
Spte HAL
aa Se
te
AL
D2L.
avet
Ende
MA
RA e LAO t
Reaion
1. From the Products table, list the name of each discontinued product and the total value of the inventory of that
Igannerption
product that we currently have on hand and give it an appropriate column name. Only list discontinued
products and only list them if the total inventory value is greater than zero. Show your list with the highest
inventory value first.
Customes
7 Cuatamr
Campnym
EmploveeTomitories
7 Employe
7 Tenitay
Contae
• Discontinued products are determined by the Discontinued column value (0 = Active, 1 = Discontinued)
The total value of inventory we have on hand is calculated by (UoitPrice * UnitsinStock)
Cantadlie
Adtra
City
Territories
Orders
Teritary
Igan
2. From the Products table, list the CategocR and the total number of different products of that category that
have not been discontinued (Discontinued = 0). Provide an appropriate column name for the total number of
products and sort your list with the category with the fewest products first.
PostaCade
Temitaryrption
Ciatiamer
Cantry
mploo
Cer
O Employ ees
7 Emplayeo
3. From the Orders table, list the Custemede and the total amount of money that customer spent on Freight for
Lant
Shppde
Shp
their orders that were shipped in 2019. The Freight column holds the Freight Cost for each order. Only list
Finte
Tie
Inight
customers who spent at least $2,000 on freight that year. Sort your list by GustomedD.
Tikay
Shpe
hpAtdara
4.
On the Employees table, list the name of each country where the employees live and the number of employees
who live in that country.
Hite
Shpity
GustomerCustomerDemo
Adda
Shpan
* CuatamwtD
Shpatka
7 CuatiamerlypD
City
Shplauniy
5. Using the QoderDetails table, list the ProductID, the total number of orders that product was included in, and
the maximum discount amount on any order of that product. Provide appropriate column names for the
number of orders and maximum discount amount. Only include products where the Maximum Discount
Igan
PatCade
Cantry
Hamhe
Amount for that product was greater than $1,000.
Exmion
Phot
GustomerDemoaraphics
Hint:
7 Cuatamer y
Nat
Shippes
• The total price before discount is the quantity multiplied by the unit price.
The discount is a decimal value. For example, it may be .15 to mean a 15% discount rate.
Cuatomern
Iepartla
Photh
Campanym
The discount amount is the total price before discount multiplied by the discount.
Transcribed Image Text:Suppliens The Northwind Traders database contains sales data for a fictitious company called Northwind Traders, which imports Products 7 Pedu t0 Companym and exports specialty foods from around the world and resales their products to restaurants and other retailers. A database diagram is provided below. Padfe Cantademe Order Details Spper CantadTie 7 Pratuc Instructions: Write SQL queries that will provide the answers to the following questions. Quntiyerhit City Unihice gan Quantity Modify this document by pasting in an image Lhinak Post Cade O BSELECT Dn Cantry of your SQL Query after each question it FROM Bowlers ndertl Phane answers. Make sure you clearly show all the Chaninund SQL (wrap long lines to a new line) and the results that are generated like in the Hama example at the right. e The number of rows in the bottom right de e t taea NAL o tte Te Categories ? Cap corner should be clearly visible and at least Fa te AL tav the first 10 results rows. he Se N Sete a Caegonyeme Pe Fo N HAL Dception tat F Turn your modified Word document into Spte HAL aa Se te AL D2L. avet Ende MA RA e LAO t Reaion 1. From the Products table, list the name of each discontinued product and the total value of the inventory of that Igannerption product that we currently have on hand and give it an appropriate column name. Only list discontinued products and only list them if the total inventory value is greater than zero. Show your list with the highest inventory value first. Customes 7 Cuatamr Campnym EmploveeTomitories 7 Employe 7 Tenitay Contae • Discontinued products are determined by the Discontinued column value (0 = Active, 1 = Discontinued) The total value of inventory we have on hand is calculated by (UoitPrice * UnitsinStock) Cantadlie Adtra City Territories Orders Teritary Igan 2. From the Products table, list the CategocR and the total number of different products of that category that have not been discontinued (Discontinued = 0). Provide an appropriate column name for the total number of products and sort your list with the category with the fewest products first. PostaCade Temitaryrption Ciatiamer Cantry mploo Cer O Employ ees 7 Emplayeo 3. From the Orders table, list the Custemede and the total amount of money that customer spent on Freight for Lant Shppde Shp their orders that were shipped in 2019. The Freight column holds the Freight Cost for each order. Only list Finte Tie Inight customers who spent at least $2,000 on freight that year. Sort your list by GustomedD. Tikay Shpe hpAtdara 4. On the Employees table, list the name of each country where the employees live and the number of employees who live in that country. Hite Shpity GustomerCustomerDemo Adda Shpan * CuatamwtD Shpatka 7 CuatiamerlypD City Shplauniy 5. Using the QoderDetails table, list the ProductID, the total number of orders that product was included in, and the maximum discount amount on any order of that product. Provide appropriate column names for the number of orders and maximum discount amount. Only include products where the Maximum Discount Igan PatCade Cantry Hamhe Amount for that product was greater than $1,000. Exmion Phot GustomerDemoaraphics Hint: 7 Cuatamer y Nat Shippes • The total price before discount is the quantity multiplied by the unit price. The discount is a decimal value. For example, it may be .15 to mean a 15% discount rate. Cuatomern Iepartla Photh Campanym The discount amount is the total price before discount multiplied by the discount.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Hyperlinks
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education