Hi Alan,
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?
You should be able to do this all in sql.
Something like:
select formation, count(formation) AS timesrun, ocall, dcall,
AVG(oyards) FROM table GROUP BY formation, ocall, dcall;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php