Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/06/2003, 12:00
Avatar de AlZuwaga
AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 años, 2 meses
Puntos: 535
La consulta que te va a devolver dos registros con sus nombres y cantidades:

SQL = "SELECT Tabla.Colores, Count(Tabla.ID) AS Cantidad FROM Tabla GROUP BY Tabla.Colores"

luego, para el total, podés hacer algo así..


do while not rs.eof
Total = Total + rs("cantidad")
response.write rs("colores") & ": " & Rs("cantidad")
response.write "<br>"
rs.movenext
loop
response.write "Total: " & Total