Tenta assim, select first 30 e.codfor, e.razsocfor, sum(e.valor) from entnota e where dat_Che between '10/01/2007' and '10/31/2007' group by e.codfor, e.razsocfor order by sum(e.valor) []s, Ricardo Pinheiro