Write a query to retrieve the most valuable customer of each year. The most valuable customer of a year is the customer

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a query to retrieve the most valuable customer of each year. The most valuable customer of a year is the customer

Post by answerhappygod »

Write a query to retrieve the most valuable customer of each year. The most valuable customer of a year is the customer who has made the most purchase for the year.Use the yearly sum of theTotalDue column in SalesOrderHeader as a customer's total purchasefor a year. If there is a tie for the most valuable customer,your solution should retrieve it.Include the customer's id, total purchase, and total order countfor the year. Display the total purchase as an integer using CAST.Sort the returned data by the year.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply