Template:Historical harvest fields for
From MediaWiki
(Difference between revisions)
Jan Steinman (Talk | contribs) (added Average field) |
Jan Steinman (Talk | contribs) |
||
Line 25: | Line 25: | ||
FORMAT(SUM(CASE WHEN YEAR(harvest.date)='2016' AND MONTH(harvest.date)='{{{1}}}' THEN harvest.quantity ELSE NULL END), 2) AS `<a href="/wiki/2016-{{{1}}}_harvest">2016-{{{1}}}</a>`, | FORMAT(SUM(CASE WHEN YEAR(harvest.date)='2016' AND MONTH(harvest.date)='{{{1}}}' THEN harvest.quantity ELSE NULL END), 2) AS `<a href="/wiki/2016-{{{1}}}_harvest">2016-{{{1}}}</a>`, | ||
FORMAT(SUM(CASE WHEN YEAR(harvest.date)='2017' AND MONTH(harvest.date)='{{{1}}}' THEN harvest.quantity ELSE NULL END), 2) AS `<a href="/wiki/2017-{{{1}}}_harvest">2017-{{{1}}}</a>`, | FORMAT(SUM(CASE WHEN YEAR(harvest.date)='2017' AND MONTH(harvest.date)='{{{1}}}' THEN harvest.quantity ELSE NULL END), 2) AS `<a href="/wiki/2017-{{{1}}}_harvest">2017-{{{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> |
Revision as of 05:45, 13 February 2017
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.