View Single Post
  #1 (permalink)  
Old 09-17-2007, 08:42 AM
Unregistered
 
Posts: n/a
Default ANY dialect question:

Stuck with a query question


Hello there

I would appreciate any help on this

I have written a query that lists the customers and their total spending from different orders.
ex.

Customers.......TotalSpending
Cust.1............$2300
Cust.2............$1100
etc.................etc...

However, I need to find the size of the minimal set of customers whose total value is over 80% of the total value of all customers.
value of a customer = total of his/her spending.

total value of all customers = (SELECT sum(TotalSpending) FROM CustomerValues)


Thanks
Reply With Quote

ANSWER(S):