string(433) " FROM tabogrupopublica G INNER JOIN (SELECT MAX(DATA) as UltimaData, COUNT(NGrupo) as QuantArq, NGrupo, NTipoArq, NSec, Data FROM tabarquivos A INNER JOIN tabtipoarq T, tabcatarq C WHERE (A.NTipoArq = T.IdTipoArq) AND (T.NTipoCat = C.Id) AND ((A.VSite = 'S') OR (A.VSite IS NULL)) AND C.Id = 6 AND A.DtDelete IS NULL GROUP BY NGrupo ) A ON(A.NGrupo = G.IdGrupoPublica) AND A.Data >= :dtini AND A.Data <= :dtfim "