Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/09/2005, 10:23
Avatar de Jose_minglein2
Jose_minglein2
 
Fecha de Ingreso: noviembre-2004
Mensajes: 2.344
Antigüedad: 19 años, 5 meses
Puntos: 8
Pues como no te coja esto, (esta me ha funcionado a mi)
Código:
(select country, count(provider_id)as total
from provider group by country order by total DESC Limit 5)
UNION
(Select 'otros' as country, count(provider_id) as total from provider where not EXISTS (select country, count(provider_id)as total
from provider group by country order by total DESC Limit 5))