Date Created: 10-Jun-2011 10:59:01 AM
Last Updated: 10-Jun-2011 10:59:01 AM
Created By : Tom
Updated By : Tom
Beginning Xbasic Programming
Puzzle 8 - Sort of a Sort
You solved Puzzle_6, and then Puzzle 7, but your sales manager now tells you
that the list of product sales shouldn't have been sorted by the product_id.
She needs the list of sales by product sorted (descending) by the sales amount.
She wants the product that generated the most dollars first, and the product
that generated the fewest dollars last. She doesn't think this will
be very difficult for you because you've already computed the total dollars
for each product. Can you have the script done by lunch time?
Hah! Just like a manager, right? [ Doggone managers. What do they know, anyway? ]
Your job now is to write an xbasic script that will list each product
and for each product show the total dollars generated by that item
across all the invoices. But display the list in descending order based
on total dollars generated by each item.
Instructions:
a) you may not use any of the built in summary functions, methods,
or operations in Alpha Five. We're doing this one by hand.
b) you may open the table only once
c) your output should be directed to the trace window
Bookmarks