En SQL SERVER puedes hacer lo siguiente:
Código:
select distinct
(select sum(ISNULL(a.VALOR,0)) from T_ABONOS a where a.TIPO = 1) -
(select sum(ISNULL(a.VALOR,0) from T_ABONOS a where a.TIPO = 2) from T_ABONOS
No se si esto funcionará contra Firebird 1.5