query-4a4f8b645e9d9a45d4112e8e5b1caef6
Chybejici stromy SELECT ?usop ?drusop ?item ?itemLabel ?obrazek ?nic ?obecLabel ?lon ?lat ?druh ?obvod ?kod ?commons WHERE { ?item wdt:P31 wd:Q811534 . #Památný strom ?item wdt:P131 ?obec . ?obec wdt:P131 ?okres . OPTIONAL{?item wdt:P677 ?usop . } FILTER regex(?usop, "105301|105974") OPTIONAL { #Dekódovat souřadnice ?item p:P625/psv:P625 ?node. ?node wikibase:geoLatitude ?lat. ?node wikibase:geoLongitude ?lon. } OPTIONAL{?item wdt:P2547 ?obvod . } OPTIONAL{?item wdt:P18 ?obrazek . } OPTIONAL{?item wdt:P373 ?commons . } OPTIONAL{?item p:P31/pq:P580 ?datum . } SERVICE wikibase:label { bd:serviceParam wikibase:language "cs" } } ORDER BY DESC(?pocetDruhu)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Chybejici stromy
SELECT ?usop ?drusop ?item ?itemLabel ?obrazek ?nic ?obecLabel ?lon ?lat ?druh ?obvod ?kod ?commons
WHERE
{
?item wdt:P31 wd:Q811534 . #Památný strom
?item wdt:P131 ?obec .
?obec wdt:P131 ?okres .
OPTIONAL{?item wdt:P677 ?usop . }
FILTER regex(?usop, "105301|105974")
OPTIONAL { #Dekódovat souřadnice
?item p:P625/psv:P625 ?node.
?node wikibase:geoLatitude ?lat.
?node wikibase:geoLongitude ?lon.
}
OPTIONAL{?item wdt:P2547 ?obvod . }
OPTIONAL{?item wdt:P18 ?obrazek . }
OPTIONAL{?item wdt:P373 ?commons . }
OPTIONAL{?item p:P31/pq:P580 ?datum . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "cs" }
}
ORDER BY DESC(?pocetDruhu)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v11("?commons"):::projected
v12("?datum")
v3("?item"):::projected
v7("?lat"):::projected
v8("?lon"):::projected
v6("?node")
v4("?obec")
v10("?obrazek"):::projected
v9("?obvod"):::projected
v5("?okres")
v1("?pocetDruhu")
v2("?usop"):::projected
a1((" "))
a2((" "))
c3(["wd:Q811534"]):::iri
c18(["cs"]):::literal
c16(["bd:serviceParam"]):::iri
f0[["regex(?usop,'105301|105974')"]]
f0 --> v2
v3 --"p:direct/P31"--> c3
v3 --"p:direct/P131"--> v4
v4 --"p:direct/P131"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P677".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:P625".-> a1
a1 --"p:statement/value/P625"--> v6
v6 --"wikibase:geoLatitude"--> v7
v6 --"wikibase:geoLongitude"--> v8
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P2547".-> v9
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P18".-> v10
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P373".-> v11
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:P31".-> a2
a2 --"p:qualifier/P580"--> v12
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c16 --"wikibase:language"--> c18
end