query-b1899f77c5982cece162fadbd16240a7
rowing competition classes SELECT ?item ?itemLabel ?itemShortName ?itemDescription ?ageclassLabel ?genderLabel ?weightclassLabel ?boatclassLabel ?boatclassShortName WHERE { ?item wdt:P31 wd:Q22936940; wdt:P641/wdt:P279* wd:Q159354; wdt:P1813 ?itemShortName . OPTIONAL { ?item p:P2094 [ ps:P2094 ?ageclass; pq:P1013 wd:Q185836 ] } OPTIONAL { ?item p:P2094 [ ps:P2094 ?gender; pq:P1013 wd:Q48277 ] } OPTIONAL { ?item p:P2094 [ ps:P2094 ?weightclass; pq:P1013 wd:Q11423 ] } OPTIONAL { ?item p:P2094 [ ps:P2094 ?boatclass; pq:P1013 wd:Q26211803 ] . ?boatclass wdt:P1813 ?boatclassShortName } SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' } }
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#>
# rowing competition classes
SELECT ?item ?itemLabel ?itemShortName ?itemDescription ?ageclassLabel ?genderLabel ?weightclassLabel ?boatclassLabel ?boatclassShortName WHERE {
?item wdt:P31 wd:Q22936940; wdt:P641/wdt:P279* wd:Q159354; wdt:P1813 ?itemShortName .
OPTIONAL { ?item p:P2094 [ ps:P2094 ?ageclass; pq:P1013 wd:Q185836 ] }
OPTIONAL { ?item p:P2094 [ ps:P2094 ?gender; pq:P1013 wd:Q48277 ] }
OPTIONAL { ?item p:P2094 [ ps:P2094 ?weightclass; pq:P1013 wd:Q11423 ] }
OPTIONAL { ?item p:P2094 [ ps:P2094 ?boatclass; pq:P1013 wd:Q26211803 ] . ?boatclass wdt:P1813 ?boatclassShortName }
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?ageclass")
v6("?boatclass")
v7("?boatclassShortName"):::projected
v4("?gender")
v1("?item"):::projected
v2("?itemShortName"):::projected
v5("?weightclass")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
c11(["wd:Q48277"]):::iri
c9(["wd:Q185836"]):::iri
c17(["en"]):::literal
c15(["bd:serviceParam"]):::iri
c2(["wd:Q22936940"]):::iri
c12(["wd:Q11423"]):::iri
c5(["wd:Q159354"]):::iri
c13(["wd:Q26211803"]):::iri
v1 --"p:direct/P31"--> c2
v1 --"p:direct/P641"--> a1
a1 --"p:direct/P279"--> c5
v1 --"p:direct/P1813"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
a2 -."p:statement/P2094".-> v3
a2 --"p:qualifier/P1013"--> c9
v1 --"p:P2094"--> a2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
a3 -."p:statement/P2094".-> v4
a3 --"p:qualifier/P1013"--> c11
v1 --"p:P2094"--> a3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
a4 -."p:statement/P2094".-> v5
a4 --"p:qualifier/P1013"--> c12
v1 --"p:P2094"--> a4
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
a5 -."p:statement/P2094".-> v6
a5 --"p:qualifier/P1013"--> c13
v1 --"p:P2094"--> a5
v6 --"p:direct/P1813"--> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end