41 lines
827 B
SQL
41 lines
827 B
SQL
SELECT *
|
|
FROM reward_gainers
|
|
FOR UPDATE;
|
|
|
|
SELECT b.reward_name,
|
|
a.*
|
|
FROM reward_gainers a,
|
|
reward_projects b
|
|
WHERE a.reward_index = b.reward_index;
|
|
|
|
--坐席工号
|
|
SELECT s.saler_code,
|
|
s.saler_name,
|
|
t.team_code,
|
|
t.team,
|
|
bm.department_code,
|
|
bm.department_name
|
|
FROM tele_saler s,
|
|
tele_saler_team t,
|
|
idst0.bm_t bm
|
|
WHERE s.team_code = t.team_code
|
|
AND t.department_code = bm.department_code
|
|
AND s.saler_name = '杜丹丹';
|
|
|
|
SELECT 部门,
|
|
SUM
|
|
FROM 车非每日保费
|
|
GROUP BY 部门
|
|
ORDER BY 部门,
|
|
科室N,
|
|
坐席名称,
|
|
签单日期;
|
|
|
|
SELECT 部门,
|
|
SUM(已续保累计) 已续保,
|
|
SUM(到期数) 到期保单,
|
|
round((SUM(已续保累计) / SUM(到期数)) * 100,
|
|
0) || '%' 续保率
|
|
FROM 坐席续保统计
|
|
GROUP BY 部门;
|