View Full Version : Statistics for a report


baggleym
05-02-2008, 03:59 AM
Hi There,

I have a database with one table (called tablestatistics). It contains the following columns with some examples of data that could be in it.

ID Location matchDate Game1 Game2 Game3 PointsWon PointsLost
101 Shipley 04/09/2007 181 176 174 8 0
108 Shipley 11/09/2007 164 194 147 2 6
109 Shipley 25/09/2007 158 160 240 6 2
110 Shipley 02/10/2007 187 168 245 3 5
111 Bradford 04/10/2007 233 232 193 4 4
114 Bradford 11/10/2007 220 222 255 8 0
115 Bradford 18/10/2007 149 202 225 6 2

Each week there could be records from either (ot both) of the locations. (Bradford or shipley)

I have created two reports, one for Bradford and one for Shipley that provides data such as average, totals etc. Fairly simple stuff

What I would like to do is add a statistics box at the bottom of the report looking something like this:

Number of games at Bradford between 100 - 200 = X
Number of games at Bradford between 200 - 250 = X
Number of games at Bradford between 250 - 300 = X
Highest Game at Bradford = XX
Lowest Game at Bradford = XX
Highest Series at Bradford (this is from the total of the 3 games) = XX
Lowest Series at Bradford = XX

I have been told that I need to do an aggregate query?

To be honest I am absolutely flumoxed with this, the original report is the edge of my database capabilities unfortunately.

I have spent ages looking around for something that I could use, tried doing loads of different queries, but to no avail. I hope that I have posted this in the correct place.

Can anyone help?

Many thanks