Tenho a seguinte consulta e com Firebird não funciona, no antigo IB6 funcionanva. SELECT COD, DES, (SELECT FIRST 1 CAMPO2 FROM TABLE2), SUM(VALUE) FROM TABLE1 GROUP BY 1,2,3 O erro que aparece é: Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause). Se eu tirar o SubSelect Funciona Alguem pode me ajudar???