Answer the question
In order to leave comments, you need to log in
How to add custom column to SQL output?
There is a request:
select count(d.id) as КОЛИЧЕСТВО from deal d
where d.status in ('3', '4')
Answer the question
In order to leave comments, you need to log in
SELECT COUNT(d.id) AS КОЛИЧЕСТВО, (CASE WHEN d.status = '3' THEN 'ОШИБКА' ELSE 'УСПЕШНО' END) AS СТАТУС
FROM deal d
WHERE d.status IN ('3', '4')
GROUP BY d.status
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question