sql - How I merge results of two queries -
here queries , there op, how merge queries ans required result
1.
select sum(rpl) rpl,decrip comm c, book b b.bookid=c.parbookid , booktype='trading' group b.decrip
o/p
rpl decrip 55 rbc 45 bny
2.
select sum(estcomm) commission,decrip comm c, book b b.bookid=c.parbookid , booktype='wash' group b.decrip
o/p
commission decrip 2234 rbc 2468 bny
how output
rpl commission decrip 55 2234 rbc 45 2468 bny
how one?
select sum(rpl) rpl, sum(estcomm) commission,decrip comm c, book b b.bookid=c.parbookid , (booktype='trading' or booktype='wash) group b.decrip
Comments
Post a Comment