Question: 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

 b. Write a query to display the customer name and theiraverage payment amount (Payments table) only if the customer's average amount paid

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. productlines * productLine textDescription htmlDescription image products * product Code productName productLine productScale productVendor product Description quantityInStock buyPrice MSRP orderdetails * order Number * productCode HAH quantityOrdered priceEach orderline Number 10 e employees employeeNumber lastName firstName extension email officeCode reports To job Title orders * orderNumber orderDate requiredDate shippedDate status comments customer Number customers * customerNumber customerName contactLastName contactFirstName phone addressLine1 addressLine2 city state postalCode country salesRepEmployeeNumber creditLimit offices 44 * officeCode city phone addressLine1 addressLine2 state country postalCode territory payments OH * customerNumber * checkNumber paymentDate amount

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!