У меня есть эта таблицакомплекс отборное на одной колонке
create table customers(id int, cust text, email id, cust_grp int);
и я использую следующий запрос на выборку, чтобы получить 3 результаты в 3 различных условиях
select count(*) as cust_with_email
from customers where email<>'' and cust_grp=101;
result
--------
199
select count(*) as cust_without_email
from customers where email='' and cust_grp=101;
result
--------
3370
select count(*) as cust_total
from customers where cust_grp=101;
result
--------
3569
Но теперь мне нужно, чтобы объединить эти три запросов в один выбор и ожидаемый результат:
custemaildet
---------------------
3569|199|3370