辦公室常用工具:修訂版本之間的差異
出自六年制學程
(→伙伴的工時計算) |
|||
第 3 行: | 第 3 行: | ||
===伙伴的工時計算=== | ===伙伴的工時計算=== | ||
− | + | 全日上班天列表:<pre> | |
− | + | ||
SELECT start,`end`-start FROM calendar WHERE type LIKE '%上班%' && user_name='○○○' | SELECT start,`end`-start FROM calendar WHERE type LIKE '%上班%' && user_name='○○○' | ||
&& start LIKE '2024-0X-%' && `end`-start>=60000 order by start</pre> | && start LIKE '2024-0X-%' && `end`-start>=60000 order by start</pre> | ||
− | + | 非全日上班列表:<pre> | |
SELECT start,`end`-start FROM calendar WHERE type LIKE '%上班%' && user_name='○○○' | SELECT start,`end`-start FROM calendar WHERE type LIKE '%上班%' && user_name='○○○' | ||
&& start LIKE '2024-0X-%' && `end`-start<60000 order by start</pre> | && start LIKE '2024-0X-%' && `end`-start<60000 order by start</pre> | ||
+ | 折算日數<pre> | ||
+ | SELECT sum(`end`-start)/36000 FROM calendar WHERE type LIKE '%上班%' && user_name='○○○' | ||
+ | && start LIKE '2024-0X-%'</pre> |
2024年5月29日 (三) 14:09的修訂版本
伙伴的工時計算
全日上班天列表:SELECT start,`end`-start FROM calendar WHERE type LIKE '%上班%' && user_name='○○○' && start LIKE '2024-0X-%' && `end`-start>=60000 order by start非全日上班列表:
SELECT start,`end`-start FROM calendar WHERE type LIKE '%上班%' && user_name='○○○' && start LIKE '2024-0X-%' && `end`-start<60000 order by start折算日數
SELECT sum(`end`-start)/36000 FROM calendar WHERE type LIKE '%上班%' && user_name='○○○' && start LIKE '2024-0X-%'