Demo:Examples/Queries/Template with tabular output and math functions

Example without extra conditionals

 * This produces the following output

Example with additional conditionals

 * This produces the following output:

Templates used to create the examples

 * Template:Template/Math/Table
 * Template:Template/Math/Table/Intro
 * Template:Template/Math/Table/Outro: the one inheriting query conditions, limit and offset