Ver Mensaje Individual
  #12 (permalink)  
Antiguo 23/09/2005, 12:22
Avatar de Linterns
Linterns
Colaborador
 
Fecha de Ingreso: diciembre-2001
Mensajes: 2.799
Antigüedad: 22 años, 4 meses
Puntos: 11
prueba con lo siguiente

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
from provider group by country order by count(provider_id) DESC Limit 5))
__________________
Bien se puede recibir una puñalada sin adulación,
pero rara vez se recibe una adulación sin puñalada
** ***