dbTalk Databases Forums  

compare all possible set combinations

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss compare all possible set combinations in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Terrie
 
Posts: n/a

Default compare all possible set combinations - 10-13-2003 , 01:11 PM






I have been asked to find a solution to this problem:

Given a number of entities in a table as follows:
ID | $Amount | Percent | Category
1 500 67 4
2 250 33 2
3 456 55 3
....
possibly with several hundred records...

Categories are assigned to a range of percents, e.g. 4 to
percents 65-100.

Question: If any number of sets can be formed containing
any number of members, is it possible to test all
combinations to see that the maximum $Amount is included
in the highest possible category based on the AVG percent
of the set members. The $Amount does not carry weight in
the calculation, so that a low percent that drags down the
average for a set might be worth the 'cost' due to a high
$Amount.

Ideas? Approaches? Solutions?

Thanks.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.