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
Post a Comment