query-e2ef04244aa81d06dd0233203b31a08b
Propertiessubclass of (P279)facet of (P1269)studied in (P2579)maintained by WikiProject (P6104)
Use at
- https://query.wikidata.org/sparql
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#>
SELECT (COUNT(DISTINCT ?class) AS ?n) WHERE {
{
VALUES ?top { wd:Q2188189 wd:Q115669410 wd:Q110879422 wd:Q18127 wd:Q32178211 wd:Q638 wd:Q65007448 wd:Q746359 wd:Q115927938 wd:Q15190726 wd:Q1760309 wd:Q5057302 }
?class wdt:P279* ?top.
} UNION {
VALUES ?theme { wd:Q638 wd:Q164204 }
?class wdt:P279*/(wdt:P1269|wdt:P2579) ?theme.
} UNION {
?class wdt:P6104 wd:Q5830855.
}
?class wdt:P279 ?superClass;
rdfs:label ?classLabel FILTER(lang(?classLabel) = 'en').
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?class"):::projected
v1("?classLabel")
v6("?n")
v5("?superClass")
v4("?theme")
v2("?top")
a1((" "))
c6(["wd:Q5830855"]):::iri
f0[["?classLabel = 'en'"]]
f0 --> v1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P6104"--> c6
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
bind1[/VALUES ?theme/]
bind1-->v4
bind10(["wd:Q638"])
bind10 --> bind1
bind11(["wd:Q164204"])
bind11 --> bind1
v3 --"wdt:P279"--> a1
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P2579"--> v4
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P1269"--> v4
end
union2r <== or ==> union2l
end
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
bind2[/VALUES ?top/]
bind2-->v2
bind20(["wd:Q2188189"])
bind20 --> bind2
bind21(["wd:Q115669410"])
bind21 --> bind2
bind22(["wd:Q110879422"])
bind22 --> bind2
bind23(["wd:Q18127"])
bind23 --> bind2
bind24(["wd:Q32178211"])
bind24 --> bind2
bind25(["wd:Q638"])
bind25 --> bind2
bind26(["wd:Q65007448"])
bind26 --> bind2
bind27(["wd:Q746359"])
bind27 --> bind2
bind28(["wd:Q115927938"])
bind28 --> bind2
bind29(["wd:Q15190726"])
bind29 --> bind2
bind210(["wd:Q1760309"])
bind210 --> bind2
bind211(["wd:Q5057302"])
bind211 --> bind2
v3 --"wdt:P279"--> v2
end
union0r <== or ==> union0l
end
v3 --"wdt:P279"--> v5
v3 --"rdfs:label"--> v1
bind4[/"count(?class)"/]
v3 --o bind4
bind4 --as--o v6