query-c1d3d33dc4125d103873abae20f4e387
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (GROUP_CONCAT(DISTINCT ?instance; SEPARATOR=', ') AS ?instances) (GROUP_CONCAT(DISTINCT ?superclass; SEPARATOR=', ') AS ?superclasses) (GROUP_CONCAT(DISTINCT ?backlink; SEPARATOR=', ') AS ?backlinks) (GROUP_CONCAT(DISTINCT ?sport; SEPARATOR=', ') AS ?sports) WHERE {
VALUES ?item {
# wd:Q1054759 wd:Q3900728 wd:Q646800 wd:Q1054925 wd:Q1054751 wd:Q5439659 wd:Q1055190 wd:Q1055125 wd:Q7642947 wd:Q76817070 wd:Q6499041 wd:Q76817032 wd:Q4817392 wd:Q39078865 wd:Q48835784 wd:Q48835853 wd:Q48835875 # Q2943040 / MMA (complete); en:Template:MMA weight classes
# wd:Q1051530 wd:Q281678 wd:Q1051922 wd:Q948780 wd:Q597315 wd:Q766904 wd:Q507205 wd:Q1004748 wd:Q508484 wd:Q282168 wd:Q867600 wd:Q645063 wd:Q1215222 wd:Q1096810 wd:Q1112498 wd:Q7642939 wd:Q763947 wd:Q1048358 wd:Q11699026 wd:Q955185 wd:Q7196574 # Q1326107 / boxing; en:Template:Boxing weight classes
# wd:Q76833043 wd:Q76833083 wd:Q76833079 wd:Q76833056 wd:Q76833074 wd:Q76833097 wd:Q76833047 wd:Q76833053 wd:Q76833113 wd:Q76833059 wd:Q76833051 wd:Q76833129 wd:Q76833241 wd:Q76833226 wd:Q76833179 wd:Q76833210 wd:Q76833257 wd:Q76833143 wd:Q76833162 wd:Q76833194 wd:Q76833147 # Q1520639 / wrestling
# wd:Q77000006 wd:Q77000008 wd:Q77000010 wd:Q77000013 wd:Q77000014 wd:Q77000017 wd:Q77000020 wd:Q77000022 wd:Q77000024 wd:Q77000027 wd:Q77000028 wd:Q77000030 wd:Q77000032 wd:Q77000033 wd:Q77000035 wd:Q77000037 wd:Q77000041 wd:Q77000042 wd:Q77000045 wd:Q77000046 wd:Q77000048 wd:Q77000051 wd:Q77000054 wd:Q77000057 wd:Q77000060 wd:Q77000062 wd:Q77000066 wd:Q77000069 wd:Q77000071 wd:Q77000073 wd:Q77000077 wd:Q77000079 wd:Q77000081 wd:Q77000084 wd:Q77000087 wd:Q77000089 # Q7674850 / taekwondo; :de:Gewichtsklasse#Taekwondo
# wd:Q77217210 wd:Q77217208 wd:Q77217209 wd:Q77217215 wd:Q77217218 wd:Q77217224 wd:Q77217228 wd:Q77217235 # Q77217027 / judo
# Q6404298 / kickboxing
# Q7248117 / professional_wrestling
# weightlifting
# powerlifting (Q213796)
# karate
# wd:Q26211786 wd:Q26211781 # rowing
}
OPTIONAL { ?item wdt:P31/rdfs:label ?instance . FILTER(LANG(?instance) = 'en') }
OPTIONAL { ?item wdt:P279/rdfs:label ?superclass . FILTER(LANG(?superclass) = 'en') }
OPTIONAL { ?item wdt:P641/rdfs:label ?sport . FILTER(LANG(?sport) = 'en') }
OPTIONAL { ?backlinkItem wdt:P527 ?item; rdfs:label ?backlink . FILTER(LANG(?backlink) = 'en') }
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?item ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?backlink"):::projected
v6("?backlinkItem")
v9("?backlinks")
v4("?instance"):::projected
v7("?instances")
v5("?item"):::projected
v2("?sport"):::projected
v10("?sports")
v3("?superclass"):::projected
v8("?superclasses")
a1((" "))
a2((" "))
a3((" "))
c8(["bd:serviceParam"]):::iri
c1(["en"]):::literal
bind0[/VALUES ?item/]
bind0-->v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P31".-> a1
a1 --"rdfs:label"--> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P279".-> a2
a2 --"rdfs:label"--> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P641".-> a3
a3 --"rdfs:label"--> v2
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v6 -."wdt:P527".-> v5
v6 --"rdfs:label"--> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c1
end
bind5[/"?instance"/]
v4 --o bind5
bind5 --as--o v7
bind6[/"?superclass"/]
v3 --o bind6
bind6 --as--o v8
bind7[/"?backlink"/]
v1 --o bind7
bind7 --as--o v9
bind8[/"?sport"/]
v2 --o bind8
bind8 --as--o v10