SELECT distinct(data1.month)as month, SUM(data1.qty)as qty,SUM(data1.weight)as weight,SUM(data1.dr_amount)as dr_amount from( select MONTH(DATE) as month,SUM(qty)as qty,SUM(qty*weight)as weight,SUM(cr_amount) as dr_amount from vcashsalp where type='P' group by month(date) union select MONTH(DATE) as month,SUM(qty)as qty,SUM(qty*weight)as weight,SUM(cr_amount) as dr_amount from vcrsalp where type='P' group by month(date) ) as data1It says: