Distribution of records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guys,

I'm looking for some help in buiding up the right queries / code for this. I have a database that tracks all the plays of my Football Team. Here are the relevant Fields:-

Formation
OCall
DCall
OYards
Key

The key is an amalgam of the first 3 fields so a typical record might look like this:-

Formation - I
OCall - RT
DCall - BZ
OYards - 5
Key - IRTBZ

What I want to do is to produce report that looks like this:-

Form
OCall
DCall
OYards - Median
OYards - Mean
OYards < 0
OYards 0 - 4
OYards 5+

So in other words for every combination of Formation, OCall and DCall I want to report how many times it occured, what the Median and Mean values were and what the distribution of plays was.

I reckon I'm going to have to create an array and then loop over the array pulling out the relevant information but are there any special techniques I should consider?

Thanks

Alan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux