
23/09/2005, 09:31
|
 | | | Fecha de Ingreso: noviembre-2004
Mensajes: 2.344
Antigüedad: 20 años, 4 meses Puntos: 8 | |
Puedes hacer 2 cosas,
1- Actualizar la versión de MySQL (a 4.18 estable)
o
2- Intentar esto (aunque no se si te lo cojera)
[CODE]
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 Pro where not EXISTS (select provider_id
from provider where provider_id=Pro.provider_id group by country order by total DESC Limit 5 )
[CODE]
Creo recordar que era así la sintaxis, es que hace mucho que no uso el NOT EXISTS, puesto que es más complicado.
Un saludo |