v3.0.0+
Status: | effective |
Progress: | 75% |
Version: | 3.0.0+ |
Demo:Standard table examples
From semantic-mediawiki.org
Help page · Ask questions · Post feedback
Please consider adopting examples to fit your environment since simple duplication may not create appropriate results.
Data presented on this page are for educational and demonstration purpose only.
Please consider adopting examples to fit your environment since simple duplication may not create appropriate results.
Data presented on this page are for educational and demonstration purpose only.
This demo page is about result format "Table"Outputs the results in a table (default for queries with printout statements).. If you would like to use result format "Broadtable"Outputs the results in a broad table. just add
|format=broadtable
to the example queries provided.
Table of Contents | |
---|---|
Simple table example[edit]
{{#ask: [[Category:City]] [[Located in::Germany]] |?Population |?Area#km²=Size in km² |format=table |mainlabel=City }}
This produces the following output:
City | PopulationThe number of inhabitants of some geographical place. | Size in km² |
---|---|---|
Berlin | 3,520,061 | 891.85 km²344.34 sqmi <br /> |
Cologne | 1,080,394 | 405.02 km²156.38 sqmi <br /> |
Frankfurt | 679,664 | 248.31 km²95.87 sqmi <br /> |
Munich | 1,353,186 | 310.43 km²119.86 sqmi <br /> |
Stuttgart | 606,588 | 207.35 km²80.06 sqmi <br /> |
Würzburg | 126,635 | 87.63 km²33.83 sqmi <br /> |
"class" parameter example[edit]
{{#ask: [[Category:City]] [[Located in::Germany]] |?Population |?Area#km²=Size in km² |format=table |mainlabel=City |class=datatable }}
This produces the following output:
"transpose" parameter example[edit]
{{#ask: [[Category:City]] [[Located in::Germany]] |?Population |?Area#km²=Size in km² |format=table |transpose=true |mainlabel=City }}
This produces the following output:
City | Berlin | Cologne | Frankfurt | Munich | Stuttgart | Würzburg |
---|---|---|---|---|---|---|
PopulationThe number of inhabitants of some geographical place. | 3,520,061 | 1,080,394 | 679,664 | 1,353,186 | 606,588 | 126,635 |
Size in km² | 891.85 km²344.34 sqmi <br /> | 405.02 km²156.38 sqmi <br /> | 248.31 km²95.87 sqmi <br /> | 310.43 km²119.86 sqmi <br /> | 207.35 km²80.06 sqmi <br /> | 87.63 km²33.83 sqmi <br /> |
"sep" parameter example[edit]
{{#ask: [[Category:City]] [[Located in::Germany]] |?Has point of interest=Point of Interest |format=table |sep=, |mainlabel=City }}
This produces the following output:
City | Point of Interest |
---|---|
Berlin | Brandenburg Gate, Museumsinsel, Reichstag |
Cologne | |
Frankfurt | |
Munich | Dom zu Unserer Lieben Frau, Schloss Nymphenburg |
Stuttgart | |
Würzburg |
The output without using the "sep" parameter (default behaviour):
City | Point of Interest |
---|---|
Berlin | Brandenburg Gate Museumsinsel Reichstag |
Cologne | |
Frankfurt | |
Munich | Dom zu Unserer Lieben Frau Schloss Nymphenburg |
Stuttgart | |
Würzburg |