Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve it as a SQL problem productlines orderdetails orderNumber INT(11) productCode VARCHAR(15) quantityOrdered INT(11) priceEach DECIMAL (10,2) orderLineNumber SMALLINT(6) products productLine VARCHAR(50) textDescription VARCHAR(4000) htmIDescription

image text in transcribedimage text in transcribedSolve it as a SQL problem

productlines orderdetails orderNumber INT(11) productCode VARCHAR(15) quantityOrdered INT(11) priceEach DECIMAL (10,2) orderLineNumber SMALLINT(6) products productLine VARCHAR(50) textDescription VARCHAR(4000) htmIDescription MEDIUMTEXT image MEDIUMBLOB Indexes productName VARCHAR(70) productLine VARCHAR(50) productScale VARCHAR(10) Indexes productVendor VARCHAR(50) productDescription TEXT quantitylnStock SMALLINT(6) buyPrice DECIMAL (10,2) MSRP DECIMAL(10,2) employeeNumber INT(11) lastName VARCHAR(50) firstName VARCHAR(50) extension VARCHAR(10) email VARCHAR(100) officeCode VARCHAR(10) reportsTo INT(11) jobTitle VARCHAR(50) contactLastName VARCHAR(50) contactFirstName VARCHAR(50) phone VARCHAR(50) addressLine1 VARCHAR(50) orders addressLine2 VARCHAR(50) orderNumber INT(11) orderDate DATE requiredDate DATE shippedDate DATE status VARCHAR(15) comments TEXT customerNumber INT(11) city VARCHAR(50) offices officeCode VARCHAR(10) city VARCHAR(50) phone VARCHAR(50) addressLine1 VARCHAR(50) addressLine2 VARCHAR(50) state VARCHAR(50) country VARCHAR(50) postalCode VARCHAR(15) territory VARCHAR(10) 3. Find the city, country, and employee count of the office that has the highest number of employees. You can safely assume that there is only one office with the highest number of employees. (10) 4. Find the total value of orders from each product line during the years 2004 and 2005. (10) 5. Find the number of payments and average payments from countries with more than ten payments in descending order by their average payments. (10) 6. Find the customers who have an order of at least 60,000$ together with the order date and order total in descending order by their order total. (10) 7. Find the first names, last names, and job titles of employees who works in Tokyo together with the first names, last names, and job titles of their supervisors

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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