query-bb6ee1472cef3378cc9a15c3204c0f9c
All items that have p3170 set and some other optional information. Also works as a map SELECT ?item ?itemLabel ?heritageId ?adminLabel ?coord ?image WHERE { ?item wdt:P3170 ?heritageId . OPTIONAL { ?item wdt:P131 ?admin } OPTIONAL { ?item wdt:P131 ?admin } OPTIONAL { ?item wdt:P625 ?coord } OPTIONAL { ?item wdt:P625 ?image } SERVICE wikibase:label { bd:serviceParam wikibase:language "hy" } }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# All items that have p3170 set and some other optional information. Also works as a map
SELECT ?item ?itemLabel ?heritageId ?adminLabel ?coord ?image
WHERE
{
?item wdt:P3170 ?heritageId .
OPTIONAL { ?item wdt:P131 ?admin }
OPTIONAL { ?item wdt:P131 ?admin }
OPTIONAL { ?item wdt:P625 ?coord }
OPTIONAL { ?item wdt:P625 ?image }
SERVICE wikibase:label { bd:serviceParam wikibase:language "hy" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?admin")
v4("?coord"):::projected
v2("?heritageId"):::projected
v5("?image"):::projected
v1("?item"):::projected
c7(["hy"]):::literal
c5(["bd:serviceParam"]):::iri
v1 --"wdt:P3170"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P131".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P131".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end