Wednesday, March 28, 2012

Need to calculate a weighted average using sql

Help!!! I'm in a time crunch and need to calculate a weighted average.
Example: 85% of players will win $10.00, 5% will win $100. I have a table
that is storing the counter information. I just drawing a blank!!!
Any help is appreciated!!!JMainus,
Can you provide some DDL, sample data and expected result?
AMB
"JMainus" wrote:

> Help!!! I'm in a time crunch and need to calculate a weighted average.
> Example: 85% of players will win $10.00, 5% will win $100. I have a tabl
e
> that is storing the counter information. I just drawing a blank!!!
> Any help is appreciated!!!|||Alejandro,
I have a table that is storing the amounts available; $10, $20, $50 and
also the number of available awards per amount, and the percentage field
stores the weighted average; ex. 85% can win $10.
Thanks for your help.
"Alejandro Mesa" wrote:
> JMainus,
> Can you provide some DDL, sample data and expected result?
>
> AMB
> "JMainus" wrote:
>|||Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. Sample data is also a good idea, along with clear
specifications. It is very hard to debug code when you do not let us
see it.

No comments:

Post a Comment