Query cities: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{#visualdataquery: city::+[[population::> 300000]] |schema=City |?city |?country |?population |format=table |limit=100 }}") Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
(53 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#visualdataquery: [[city::+ | |||
{{#visualdataform: City | |||
|title = Add City | |||
|action = create | |||
|edit-page = | |||
|return-page = | |||
|view = popup | |||
|popup-size = medium | |||
|css-class = | |||
|pagename-formula = <city> | |||
|edit-freetext = City | |||
|edit-categories = false | |||
|edit-content-model = false | |||
|target-slot = jsondata | |||
|default-categories = | |||
|default-content-model = wikitext | |||
|layout-align = top | |||
|popup-help = false | |||
|submit-button-text = | |||
|layout = tabs | |||
|submit-button-text = | |||
|validate-button-text = | |||
}} | |||
All cities: | |||
{{#visualdataquery: [[city::+]] | |||
|schema=City | |schema=City | ||
|?city | |?city | ||
|?country | |?country | ||
|?population | |?population | ||
|format=table | |||
|order=population desc | |||
|limit=20 | |||
}} | |||
<pre> | |||
[[city::+]][[population::> 3000000]] | |||
</pre> | |||
<!-- | |||
|?capital | |||
|template?capital=capital | |||
--> | |||
The following table uses (in the first column) the printout template [[Template:Link to country]] to perform a join with the "Country article" schema. | |||
The column "city" is the actual subject of the query, whose link is still retrieved using a template, but without an additional query. | |||
{{#visualdataquery: [[city::+]][[population::> 3000000]] | |||
|schema=City | |||
|?country | |||
|?city | |||
|?population | |||
|template?country=Link to country | |||
|template?city=Link to city | |||
|pagetitle=false | |||
|order=population desc | |||
|format=table | |format=table | ||
|limit=100 | |limit=100 | ||
}} | }} | ||
== See also == | |||
{{Demo VisualData footer}} | |||
jsondata | |||
---|---|---|---|
Line 1: | Line 1: | ||
{} | { | ||
"categories": [ | |||
"A" | |||
] | |||
} |
Latest revision as of 19:36, 28 April 2024
form is loading...
All cities:
page title | city | country | population |
---|---|---|---|
London | London | United Kingdom | 8982000 |
New York | New York | United States | 8468000 |
Prague | Prague | Czech Republic | 4000000 |
Madrid | Madrid | Spain | 3223000 |
Athens | Athens | Greece | 3155000 |
Rome | Rome | Italy | 2873000 |
Regensburg | Regensburg | Germany | 150000 |
[[city::+]][[population::> 3000000]]
The following table uses (in the first column) the printout template Template:Link to country to perform a join with the "Country article" schema.
The column "city" is the actual subject of the query, whose link is still retrieved using a template, but without an additional query.
false | country | city | population |
---|---|---|---|
London | 8982000 | ||
New York | 8468000 | ||
Prague | 4000000 | ||
Madrid | 3223000 | ||
Athens | 3155000 |