Baylah Posted February 14, 2004 Posted February 14, 2004 Hi Everyone, Is there a way to sort the return from a summary query? My data base has more than 9,000 orders in it, and what I would like to do is get a display for how many times a customer has placed an order. I can use count of records which gives me a return of how many times a particular customer has placed an order and display it in the summary preview mode, but I can not figure out how to then sort the list by number of orders, so I kow which customers are placing the larges volume of orders. Any suggestions...This owuld be very helpful to me. Thanks, Steve
LaRetta Posted February 14, 2004 Posted February 14, 2004 Hi Steve, There are probably other ways, but one way would be to create a self-join, joining the CustomerID on both sides. Create a calculation called cCountOrders (number) with: Count(SelfJoin::OrderID) Then create a Columnar/List report with Grouped data. Select cCountOrders and CustomerID or CustomerName. Categorize by cCountOrders and also sort by this field in descending order. You can even move the CustomerName up to the Count line and delete the body. This would give you a list of each Customer and their total order count only. LaRetta
Recommended Posts
This topic is 7588 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now