Ciao, con questo codice:

codice:
   SQL = " SELECT *, SUM(AAA) AS A, SUM(BBB) AS B, SUM(CCC) AS C GROUP BY IDCD "

   Set oRs = Server.CreateObject("ADODB.Recordset")
   oRs.Open SQL, cn
   
   If not oRS.eof then

			  Response.Write "<td align=center>INT</td>"
			  Response.Write "<td align=center>A</td>"
			  Response.Write "<td align=center>B</td>"
			  Response.Write "<td align=center>C</td>"

      Do While not oRS.eof

			  Response.Write "<td align=center>" & oRs("INT") & "</td>"
			  Response.Write "<td align=center>" & oRs("A") & "</td>"
			  Response.Write "<td align=center>" & oRs("B") & "</td>"
			  Response.Write "<td align=center>" & oRs("C") & "</td>"

     oRS.movenext
   Loop  

      
   end if  

oRS.Close
Set oRS = Nothing
								
cn.Close
Set cn = Nothing
Ottengo questo output:

codice:
INT A B C

CAT 3 1 0
MAG 2 0 1
Come faccio ad avere la somma dei dati per colonna e per riga, cioè questo output ?:

codice:
INT A B C  | TotRiga

CAT 3 1 0  | 4
MAG 2 0 1  | 3

TOT 5 1 1  | 7
Grazie-