Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a query to display the city and country where an office is located and a count of the number of employees at that location.

image text in transcribedimage text in transcribedimage text in transcribed

Write a query to display the city and country where an office is located and a count of the number of employees at that location. Order the results in descending order of the number of employees. a. b. Write a query to display the customer name and their average payment amount (Payments table) only if the customer's average amount paid is less than the average payments of all customers. Order the results by the average payment amount from highest to lowest. Write a query to display the customer name and the number of payments they have made that is greater than their average payment amount. Order the results by the descending number of payments. c. d. Write a query to list out the product names and the percentage of customers that have ordered the product. offices officeCode City Payments phone checkNumber paymentDate addressLine1 addressLine2 amount state custome rNumber country postalCode territory officeLocation Customers customerNumber CustomerName contactastName Employees employe eNumber lastName firstName extension email contactFirstName phone addressLine1 addressne City state postalCode reportsTo jobTitle OfficeCode Productines country salesRepEmployeeNumber creditLimit productLine textDescription custome rLoc ation 2 Customers customerNumber CustomerName Employees employeeNumber contactastName contactFirstName phone addressLine1 lastName firstName G| extension addressne2 email reportsTo state postalCode country salesRepEmployeeNumber jobTitle officeCode ProductLines productLine textDescription creditLimit custome rLocation Orders orderNumber orderDate Products productCode productName productScale productVendor OrderDetails orderNumber productCode quantityOrdered requiredDate shipped Date status comments custome rNumber productDescription quantity In Stock buy Price MSRP productLine priceEach orderLineNumber

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