Template:Historical labour fields
From MediaWiki
(Difference between revisions)
Jan Steinman (Talk | contribs) (added column for 2020) |
Jan Steinman (Talk | contribs) (added 2021 column) |
||
Line 29: | Line 29: | ||
FORMAT(SUM(CASE WHEN YEAR(t.`in`)='2019' THEN TIMESTAMPDIFF(MINUTE, t.`in`, t.`out`)/60 ELSE NULL END), 1) AS `<a href="/wiki/2019_labour">2019</a>`, | FORMAT(SUM(CASE WHEN YEAR(t.`in`)='2019' THEN TIMESTAMPDIFF(MINUTE, t.`in`, t.`out`)/60 ELSE NULL END), 1) AS `<a href="/wiki/2019_labour">2019</a>`, | ||
FORMAT(SUM(CASE WHEN YEAR(t.`in`)='2020' THEN TIMESTAMPDIFF(MINUTE, t.`in`, t.`out`)/60 ELSE NULL END), 1) AS `<a href="/wiki/2020_labour">2020</a>`, | FORMAT(SUM(CASE WHEN YEAR(t.`in`)='2020' THEN TIMESTAMPDIFF(MINUTE, t.`in`, t.`out`)/60 ELSE NULL END), 1) AS `<a href="/wiki/2020_labour">2020</a>`, | ||
+ | FORMAT(SUM(CASE WHEN YEAR(t.`in`)='2021' THEN TIMESTAMPDIFF(MINUTE, t.`in`, t.`out`)/60 ELSE NULL END), 1) AS `<a href="/wiki/2021_labour">2021</a>`, | ||
FORMAT(SUM(TIMESTAMPDIFF(MINUTE, t.`in`, t.`out`)/60), 1) AS `Total` | FORMAT(SUM(TIMESTAMPDIFF(MINUTE, t.`in`, t.`out`)/60), 1) AS `Total` | ||
FROM `s_timelog` t</includeonly> | FROM `s_timelog` t</includeonly> |
Latest revision as of 19:32, 31 December 2020
Usage
This template is used to provide the fields in the various tables on the historical labour page. They are collected here in the interest of easily adding new years, or changing the basic format and information. This template is unlikely to be useful in any other way.
Parameters
- none