【发布时间】:2021-05-21 14:09:52
【问题描述】:
我有一个有效的闲置查询:
SELECT count(cand_id) as candidates, SB.client_id as client
FROM REPLIES r
JOIN clients sb on sb.main_acc_id = r.acc_id
where reply_dt >= TO_DATE('2021-02-08 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
AND reply_dt <= TO_DATE('2021-02-15 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
AND sb.status = 'A'
GROUP BY client_id
它产生如下结果:
Candidates| Clients
2 | client 1
4 | cleint 2
56 | client whatever..
在给定的日期范围内,我将如何按天和客户细分候选人数量?所以它会显示当天,没有候选人,客户
【问题讨论】: