select
t1.non_seller,
t3.coupon,
ifnull(sum(t2.bal),0)
from
(select seller,coupon from
(select distinct seller from t2) c,
(select distinct coupon from t2) d
) t3
left join t2 on
t3.seller=t2.seller and t3.coupon=t2.coupon
join t1
on t1.seller=t3.seller
group by
t1.non_seller,t3.coupon
order by t3.coupon,t1.non_seller
select st1.non-seller, s.coupon, sum(bal)
from t1 cross join (select distinct coupon from t2) s
left join t2 on t2.seller=t1.seller and t2.coupon=s.coupon
group by t1.non-seller,s.coupon
order by coupon,non-seller