【发布时间】:2019-11-16 01:10:09
【问题描述】:
我有一个像这样的串行 sql:
select count(distinct userId) from table where hour >= 0 and hour <= 0;
select count(distinct userId) from table where hour >= 0 and hour <= 1;
select count(distinct userId) from table where hour >= 0 and hour <= 2;
...
select count(distinct userId) from table where hour >= 0 and hour <= 14;
有没有办法将它们合并到一个 sql 中?
【问题讨论】:
-
操作时尝试用例