sql - Connect 2 queries -


i have 2 following queries:

select count(distinct custpersonid) count1    my_precustperson   rsv_no = 1510708         , custpersonid not null   select count(*) count2    my_precustperson   rsv_no = 1510708         , custpersonid null  

i want plus value count1 count2 (count1+count2) don't know how do. please me find out best query situation.

select (select count(distinct custpersonid) count1        my_precustperson       rsv_no = 1510708             , custpersonid not null)      + (select count(*) count2          my_precustperson         rsv_no = 1510708               , custpersonid null);  

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -