I want to fetch 2 coulmns count and do their total as a new column. How can I do this?
i 撰写了这一问询,但这完全是错的。
SELECT count(case when `status`= 1 then 1 else 0 end) AS HOT,
count(case when `status`= 5 then 1 end)
AS Special_Case,count(case when 1=1 then 1 end) AS TOTAL
FROM `tbl_customer_conversation` group by
date(`dt_added`),user_id