Mensaje    Asunto: Agrupar resultados de un query Responder citando

Tengo que ejecutar un query de este estilo contra tablas Paradox:
Código:
SELECT COUNT(A.Referencia) Recibos, SUM(B.Cuota) Importe, 1 ForPago, B.PerPago
  FROM 'Emision.db' A, 'Persona.db' B
 WHERE A.CodPrv = 45 AND A.RefInt LIKE '1%'
   AND A.CodPrv = B.CodPrv AND A.Referencia = B.Referencia
   AND B.ForPago = 0 AND B.Entidad NOT IN (SELECT Entidad FROM 'Bancos.db')
 GROUP BY B.ForPago, B.PerPago
 UNION
SELECT COUNT(A.Referencia) Recibos, SUM(B.Cuota) Importe, B.ForPago, B.PerPago
  FROM 'Emision.db' A, 'Persona.db' B
 WHERE A.CodPrv = 45 AND A.RefInt LIKE '1%'
   AND A.CodPrv = B.CodPrv AND A.Referencia = B.Referencia
   AND B.ForPago = 1
 GROUP BY B.ForPago, B.PerPago
 ORDER BY ForPago, PerPago

Se ejecuta a la perfección pero me gustaría que en vez de este resultado:
Código:
Recibos  Importe    ForPago PerPago
2        60,00      1       0
10       78,00      1       1
60       334,00     1       1
3        43,00      1       2
13       141,00     1       2
84       1.614,00   1       3
1737     26.961,00  1       3

se obtuviera este otro:
Código:
Recibos  Importe    ForPago PerPago
2        60,00      1       0
70       412,00     1       1
16       174,00     1       2
1821     28.575,00  1       3

Y no se me ocurre como hacerlo.
_________________
Un saludo

Necesitamos tu ayuda: Envía AI al 27595 (Coste 1,20 euros + IVA)