I am trying to select only one of the records of multiple agregated tables with this query:
select * from table1 C left join
table2 E on C.id=E.id left join
table3 D on E.id=D.id
where C.id=id and (E.id IS NULL or D.id IS NOT NULL)
GROUP BY C.field
When execute this query a SQLException is launched:
the expression is not in an agreement or columns of the GROUP BY
What wrong in the query?
Thanks