Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL Queries Does the company offer any products that it has not sold? If yes, what products have not been sold? The above can include

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

SQL Queries

Does the company offer any products that it has not sold? If yes, what products have not been sold?

The above can include answering the following questions: How many different products (differentiated by productCode) does the company have? How many different products (differentiated by productCode) have been ordered?

What is the productLine and textDescription for the product lines in which the products that have not sold belong? (if there are any)

A sales manager is interested in how (or if) the priceEach for products ordered changes over time. Create a query that lists the productCode and priceEach for all the orders and order the results by productCode and priceEach. The ordering of the productCode is ascending and of the priceEach is descending.

Company Database Schema Table: customers # Name Type int(11) varchar(50) latin1_swedish c varchar(50) latin1_swedish_ci varchar(50) latin1_swedish_ci varchar(50) latin1 swedish_o varchar(50) latin1 swedish ci varchar(50) atin1_swedish c varchar(50) latin1_swedish_ci varchar(50) latin1 swedish_o varchar(15) latin1_swedish_ci varchar(50) latin1 swedish c Collation Attributes Null Default Extra 1 customerNumber 2 customerName 3 contactLastName 4 contactFirstName 5 phone 6 addressLinet 7 addressLine2 8 city 9 state No None No None No None No None No None No None Yes NULL No None Yes NULL Yes NULL No None Yes NULL Yos NULL 10 postalCode 11 country 12 salesRepEmployeeNumber int(11) 13 creditLimit decimal(10,2) Table: employees # Name 1 employeeNumber int(11) 2 lastName 3 firstName 4 extension 5 email 6 officeCode 7 reportsTo 8 jobTitle Type Collation Attributes Null Default Extra varchar(50) latin1_swedish_ci varchar(50) latin1_swedish_ci varchar(10) latin1_swedish_ci varchar 100) latin1_swedish_ci varchar(10) latin1_swedish_ci int(11) varchar(50) latin1_swedish_ci No None No None No None No None No None No None Yes NULL No None

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

Students also viewed these Databases questions