Y como seria? porque esto me da error:
Código SQL
[-]
SELECT NOMBRE, FECHAVTO, IMPORTE
FROM VTOSCOBR
where FECHAVTO between '2017-04-28' and '2017-05-01'
group by FECHAVTO
having (sum(importe) < 1000)
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause).
lo estoy probando con IBEXPERT antes de hacerlo con DELPHI