I am trying to get aggregate values from each table for each mix no.
Query as follows:
SELECT RawMaterialPreparation.Uniid, RawMaterialPreparation.MixNo, RawMaterialPreparation.MixQty, SUM(VacuumMixing.MixQty) AS VacuumQty,
SUM(MaterialFilling.FilledQty) AS FilledQty
FROM MaterialFilling LEFT OUTER JOIN
VacuumMixing ON MaterialFilling.VacuumMixId = VacuumMixing.Uniid RIGHT OUTER JOIN
RawMaterialPreparation ON VacuumMixing.MixId = RawMaterialPreparation.Uniid
GROUP BY RawMaterialPreparation.Uniid, RawMaterialPreparation.MixNo, RawMaterialPreparation.MixQty
ORDER BY RawMaterialPreparation.Uniid DESC
Note: Each mix no can have more than one transaction in vacuum mixing table and each vacuum mix each have more than one transaction in material filling table.