Template:SPARQL/published in place/doc
Appearance
This is a documentation subpage for Template:SPARQL/published in place. It contains usage information, categories and other content that is not part of the original template page. |
Usage
[edit]SPARQL query for works with a place of publication (P291) of a place, or any place in that place.
Parameters:
- 1: The Q-id of the place
- name: Override for the place name (if not given: the label of 1 from Wikidata)
Example
{{SPARQL|query= {{SPARQL/published in place|Q724}} }}
# Items published in Q724 (Maine)
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?page_titleWS where {
VALUES ?Maine { wd:Q724 }
?item wdt:P291/wdt:P131* ?Maine . # P291 = published in
OPTIONAL {
?article schema:about ?item;
schema:isPartOf <https://en.wikisource.org/>;
schema:name ?page_titleWS.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
See also
[edit]