query-b49e69627fd466abc22c270faae82b38
Propertiessport (P641)instance of (P31)time period (P2348)start time (P580)end time (P582)
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?begin_date ?end_date WHERE {
?item wdt:P641 ?sport ;
wdt:P31 ?competition.
FILTER (?sport IN (wd:Q1682809, wd:Q926191, wd:Q4179462, wd:Q4305887, wd:Q38108))
FILTER (?competition IN (wd:Q57305027, wd:Q2990963))
MINUS { ?item wdt:P2348 ?period .}
?item p:P580/psv:P580 ?begin_date_node .
?begin_date_node wikibase:timePrecision "11"^^xsd:integer .
?begin_date_node wikibase:timeValue ?begin_date .
?item p:P582/psv:P582 ?end_date_node .
?end_date_node wikibase:timePrecision "11"^^xsd:integer .
?end_date_node wikibase:timeValue ?end_date .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
FILTER("2007-07-01"^^xsd:date <= ?begin_date && ?begin_date < "2008-06-30"^^xsd:dat).
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?begin_date"):::projected
v6("?begin_date_node")
v2("?competition")
v8("?end_date"):::projected
v7("?end_date_node")
v4("?item"):::projected
v5("?period")
v3("?sport")
a1((" "))
a2((" "))
c16(["11^^xsd:integer"]):::literal
c23(["en"]):::literal
c21(["bd:serviceParam"]):::iri
f0[["'2007-07-01^^xsd:date' <= ?begin_date?begin_date < s2008-06-30^^<http://www.w3.org/2001/XMLSchema#dat>'"]]
f0 --> v1
list0c2(["wd:Q2990963"]):::iri
list0c1(["wd:Q57305027"]):::iri
list0c1 --o f1
list0c2 --o f1
f1[[" in "]]
f1 --> v2
list1c4(["wd:Q4305887"]):::iri
list1c2(["wd:Q926191"]):::iri
list1c5(["wd:Q38108"]):::iri
list1c1(["wd:Q1682809"]):::iri
list1c3(["wd:Q4179462"]):::iri
list1c1 --o f2
list1c2 --o f2
list1c3 --o f2
list1c4 --o f2
list1c5 --o f2
f2[[" in "]]
f2 --> v3
v4 --"p:direct/P641"--> v3
v4 --"p:direct/P31"--> v2
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v4 --"p:direct/P2348"--> v5
end
v4 --"p:P580"--> a1
a1 --"p:statement/value/P580"--> v6
v6 --"wikibase:timePrecision"--> c16
v6 --"wikibase:timeValue"--> v1
v4 --"p:P582"--> a2
a2 --"p:statement/value/P582"--> v7
v7 --"wikibase:timePrecision"--> c16
v7 --"wikibase:timeValue"--> v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c21 --"wikibase:language"--> c23
end