query-a6b6c6b501f7deadb27a59208f121cd0
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?team ?homeVenueQCode ?homeVenueQCodeLabel ?start ?end WHERE {
VALUES ?team {
wd:Q272220
}
OPTIONAL { ?team p:P115 ?stat .
?stat ps:P115 ?homeVenueQCode.
OPTIONAL {?stat pq:P580 ?start .}
OPTIONAL {?stat pq:P582 ?end .}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} order by ?start
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?end"):::projected
v4("?homeVenueQCode"):::projected
v1("?start"):::projected
v3("?stat")
v2("?team"):::projected
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
bind0[/VALUES ?team/]
bind0-->v2
bind00(["wd:Q272220"])
bind00 --> bind0
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P115".-> v3
v3 --"p:statement/P115"--> v4
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P580".-> v1
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P582".-> v5
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end