Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/11/2005, 12:30
Avatar de Hereje
Hereje
 
Fecha de Ingreso: junio-2002
Ubicación: Córdoba, Argentina
Mensajes: 439
Antigüedad: 22 años, 10 meses
Puntos: 2
Prueba con algo así:

"select cat.id, cat.nombre, count(reg.id) as cantidad from cat inner join reg on cat.id = reg.id_cat group by cat.id"

Y para ordenar por cantidades añadir: "order by cantidad"

Espero funcione. Saludos.
__________________
Sergio