desktop_task_schedule/code/db/常用语句.sql

42 lines
858 B
MySQL
Raw Normal View History

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>
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
2023-04-12 10:27:24 +00:00
AND s.saler_name = '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
SELECT *
FROM tele_saler_team t
WHERE t.team_code = '107077'
SELECT *
FROM <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>
ORDER BY <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
ǩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
2023-04-06 10:20:16 +00:00
2023-04-06 01:25:46 +00:00
SELECT <EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD><EFBFBD><EFBFBD>,
round((SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>) / SUM(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)) * 100,
0) || '%' <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
FROM <EFBFBD><EFBFBD>ϯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><EFBFBD>
GROUP BY <EFBFBD><EFBFBD><EFBFBD><EFBFBD>;