SELECT P.ID,P.Name,P.Model,sum(Price_Sub_01),sum(Price_Sub_02) From Products P left join Price01 P01 ON P.ID=P01.Prd_ID left join Price02 P02 ON P.ID=P02.Prd_ID
group by P.id
having sum(Price_Sub_01)=sum(Price_Sub_02)
select p.ID, p.Name, p.Model, sum(pa.Price_Sub_01), sum(pb.Price_Sub_02)
from Produces as p,Price01 as pa,Price02 as pb
where p.id=pa.prd_id and p.id=pb.prd_id
group by p.id