2023-03-21 03:42:12 +00:00
|
|
|
|
SELECT *
|
|
|
|
|
FROM reward_gainers
|
2023-03-21 10:01:05 +00:00
|
|
|
|
FOR UPDATE;
|
|
|
|
|
|
|
|
|
|
SELECT b.reward_name,
|
|
|
|
|
a.*
|
|
|
|
|
FROM reward_gainers a,
|
|
|
|
|
reward_projects b
|
|
|
|
|
WHERE a.reward_index = b.reward_index;
|
2023-03-23 10:39:15 +00:00
|
|
|
|
|
2023-04-06 10:20:16 +00:00
|
|
|
|
--<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2023-04-27 04:24:55 +00:00
|
|
|
|
SELECT DISTINCT s.saler_code,
|
|
|
|
|
s.saler_name,
|
|
|
|
|
t.team_code,
|
|
|
|
|
t.team,
|
|
|
|
|
bm.department_code,
|
|
|
|
|
bm.department_name
|
2023-04-06 10:20:16 +00:00
|
|
|
|
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
|
2023-04-26 12:19:49 +00:00
|
|
|
|
AND s.saler_code = '61136';
|
2023-04-12 10:27:24 +00:00
|
|
|
|
|
|
|
|
|
SELECT *
|
|
|
|
|
FROM tele_saler_team t
|
|
|
|
|
WHERE t.team_code = '107077'
|
|
|
|
|
|
|
|
|
|
SELECT *
|
2023-06-04 11:11:44 +00:00
|
|
|
|
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
|
2023-04-12 10:27:24 +00:00
|
|
|
|
ORDER BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
|
|
|
|
ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
2023-04-06 10:20:16 +00:00
|
|
|
|
|
2023-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BD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>),
|
|
|
|
|
round(SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
|
|
|
|
|
2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2023-06-04 11:11:44 +00:00
|
|
|
|
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
|
2023-06-02 10:04:26 +00:00
|
|
|
|
GROUP BY <EFBFBD>·<EFBFBD>,
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD>,
|
|
|
|
|
<EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
HAVING <EFBFBD>·<EFBFBD> = '06<EFBFBD><EFBFBD>'
|
|
|
|
|
ORDER BY <EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD>,
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC;
|
|
|
|
|
|
|
|
|
|
SELECT <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
|
|
|
|
round(SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ںϱ<EFBFBD><EFBFBD><EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD>ո<EFBFBD><EFBFBD>˿ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) * 100,
|
|
|
|
|
2) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2023-06-04 11:11:44 +00:00
|
|
|
|
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
|
2023-06-02 10:04:26 +00:00
|
|
|
|
WHERE <EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD> = 'QDI'
|
|
|
|
|
AND <EFBFBD>·<EFBFBD> = '06<EFBFBD><EFBFBD>'
|
|
|
|
|
GROUP BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
ORDER BY <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DESC;
|
2023-06-04 11:11:44 +00:00
|
|
|
|
|
|
|
|
|
--<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
SELECT *
|
|
|
|
|
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>
|