note
Your Mother
<p>This sounds like an SQL question so far; you can do pretty complicated stats and such without ever leaving the DB. Sample input (meaning schema info probably) and desired output would be more likely to get feedback, advice, or sample code.
</p>
1050713
1050713