query-762f70deca47471aa606ed3ae8639aaa
TODO
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?yardLabel ?date ?placeLabel ?eventLabel WHERE {
{ ?item wdt:P793 wd:Q336332. }
UNION
{ ?item wdt:P793 wd:Q906512. }
?item wdt:P176 ?yard.
?yard wdt:P17 wd:Q17.
?item wdt:P31/wdt:P279* wd:Q11446;
p:P793 ?statement.
?statement ps:P793 ?event.
OPTIONAL {?statement pq:P276 ?place. }
OPTIONAL {?statement pq:P585 ?date. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
FILTER(?event IN(wd:Q336332, wd:Q906512))
}
ORDER BY (?yard)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?date"):::projected
v2("?event")
v3("?item"):::projected
v5("?place")
v4("?statement")
v1("?yard")
a1((" "))
c1(["wd:Q336332"]):::iri
c17(["en"]):::literal
c6(["wd:Q17"]):::iri
c15(["bd:serviceParam"]):::iri
c2(["wd:Q906512"]):::iri
c9(["wd:Q11446"]):::iri
list0c1(["wd:Q336332"]):::iri
list0c2(["wd:Q906512"]):::iri
list0c1 --o f0
list0c2 --o f0
f0[[" in "]]
f0 --> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"p:direct/P793"--> c2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"p:direct/P793"--> c1
end
union0r <== or ==> union0l
end
v3 --"p:direct/P176"--> v1
v1 --"p:direct/P17"--> c6
v3 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c9
v3 --"p:P793"--> v4
v4 --"p:statement/P793"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P276".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P585".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end