如何将以下2个查询合并到一个查询中?SQL:在同一字段中使用不同where子句的2个不同计数
select count(distinct user_id) as action_1_count, date
from table
where action = "action_1"
group by date;
select count(distinct user_id) as action_2_count, date
from table
where action = "action_2"
group by date;
你想让他们为两列或两行? – 2012-08-15 17:58:30