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

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -