query-e51d9ea216cb198d27adba97d843d645
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?event ?eventLabel ?tournamentLabel ?year ?countryLabel ?surfaceLabel ?purse ?participants
WHERE
{
?event wdt:P1346 wd:Q182736 .
OPTIONAL { ?event wdt:P361 ?tournament .
OPTIONAL { ?tournament wdt:P765 ?surface . }
OPTIONAL { ?tournament wdt:P2121 ?purse . }
OPTIONAL { ?tournament wdt:P17 ?country . }
}
OPTIONAL { ?event wdt:P585 ?time . BIND(year(?time) as ?year) }
OPTIONAL { ?event wdt:P1132 ?participants . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?country")
v1("?event"):::projected
v8("?participants"):::projected
v4("?purse"):::projected
v3("?surface")
v6("?time")
v2("?tournament")
v7("?year"):::projected
c10(["bd:serviceParam"]):::iri
c2(["wd:Q182736"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P1346"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P361".-> v2
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P765".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P2121".-> v4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P17".-> v5
end
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P585".-> v6
bind0[/"year-from-dateTime(?time)"/]
v6 --o bind0
bind0 --as--o v7
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1132".-> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end