Template:Historical harvest fields for
From MediaWiki
(Difference between revisions)
Jan Steinman (Talk | contribs) (added column for 2020) |
Jan Steinman (Talk | contribs) m |
||
Line 28: | Line 28: | ||
FORMAT(SUM(CASE WHEN YEAR(harvest.date)='2019' AND MONTH(harvest.date)='{{{1}}}' THEN harvest.quantity ELSE NULL END), 2) AS `<a href="/wiki/2019-{{{1}}}_harvest">2019-{{{1}}}</a>`, | FORMAT(SUM(CASE WHEN YEAR(harvest.date)='2019' AND MONTH(harvest.date)='{{{1}}}' THEN harvest.quantity ELSE NULL END), 2) AS `<a href="/wiki/2019-{{{1}}}_harvest">2019-{{{1}}}</a>`, | ||
FORMAT(SUM(CASE WHEN YEAR(harvest.date)='2020' AND MONTH(harvest.date)='{{{1}}}' THEN harvest.quantity ELSE NULL END), 2) AS `<a href="/wiki/2020-{{{1}}}_harvest">2020-{{{1}}}</a>`, | FORMAT(SUM(CASE WHEN YEAR(harvest.date)='2020' AND MONTH(harvest.date)='{{{1}}}' THEN harvest.quantity ELSE NULL END), 2) AS `<a href="/wiki/2020-{{{1}}}_harvest">2020-{{{1}}}</a>`, | ||
- | + | -- FORMAT(AVG(harvest.quantity), 2) AS `Average`, | |
harvest.units AS Units | harvest.units AS Units | ||
FROM | FROM | ||
s_product_harvest harvest</includeonly> | s_product_harvest harvest</includeonly> |
Latest revision as of 06:46, 3 November 2019
Usage
This template is used to provide the fields in the various tables on the monthly historical harvest pages. 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
- two-digit number of the month to be summarized, such as '03' for March.