Salve,
ho creato una tabella che raccoglie al suo interno le statistiche dei giocatore, chiamata Statistiche_Gare, legate alla tabella Giocatori tramite idPlayer.

ho creato una pagina ASP che tramite Recordset dovrebbe stamparmi a video le medie che questi giocatori tengono nelle partite giocate

ecco l'SQL

SELECT (sum(PTI)/sum(PG)) as A, ((sum(TLF)/sum(TLT))*100) as B, ((sum(T2F)/sum(T2T))*100) as C, ((sum(T3F)/sum(T3T))*100) as D, (sum(RD)/sum(PG)) as E, (sum(RO)/sum(PG)) as F, (sum(PP)/sum(PG)) as G, (sum(PR)/sum(PG)) as H, (sum(AST)/sum(PG)) as I, (sum(STD)/sum(PG)) as L, (sum(STS)/sum(PG)) as M, (sum(FF)/sum(PG)) as N, (sum(FS)/sum(PG)) as O, (sum(PTI + TLF - TLT + T2F - T2T + T3F - T3T + RD + RO - PP + PR + AST + STD - STS - FF + FS)/sum(PG)) as P, Statistiche_Gare.PG, Roster.Giocatore
FROM Statistiche_Gare INNER JOIN Roster ON Statistiche_Gare.idPlayer = Roster.idPlayer GROUP BY Statistiche_Gare.idPlayer, Roster.Giocatore, Statistiche_Gare.PG

PG sta per partite giocate.

quello che ottengo così però non è giocatore per giocatore la media personale, ma una cosa del genere:

Statistiche Totali
GIOCATORE PG PT TL T2 T3 RD RO PP PR AST SD SS FF FS

Giocatore 1 1 0 0/0 0/0 0/0 7 1 1 1 0 0 0 2 0
Giocatore 2 1 0 0/0 0/2 0/0 0 1 1 0 0 0 0 1 0
Giocatore 3 1 2 0/2 1/1 0/0 3 1 1 1 0 1 0 2 1
Giocatore 4 1 8 4/4 2/6 0/3 1 1 0 0 0 0 0 2 3


Statistiche Medie
GIOCATORE PT TL T2 T3 RD RO PP PR AST SD SS FF FS

Giocatore 1 - 0 0% 0% 0% 7 1 1 1 0 0 0 2 0
Giocatore 2 - 0 0% 0% 0% 0 1 1 0 0 0 0 1 0
Giocatore 3 - 0 0% 0% 0% 3 1 1 1 0 1 0 2 1
Giocatore 4 - 8 100% 33,3% 0% 1 1 0 0 0 0 0 2


in pratica non mi fa la media di alcune colonne della tabella.

Come posso perfezionare la mia SQL?