I need to fetch child entities along with the SUM of a field 'amount' from all child records (of a particular parent record). For E.g. If there are 3 child records for a parent record, so need to have SUM of all 3 different amount values of each child record. Also, the SUM needs to be calculated for the child records where it meets certain criteria. I already tried adding aggregate along with filter condition (so that my aggregate would be applicable on filtered records only), but it did not work. Please suggest.
TIA.