query-aed6c3bb851066a43476552379e6f0a9
Type of Software
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?typeLabel (count(?typeLabel) as ?count) WHERE {
{
?floss p:P31 ?val.
?val ps:P31/wdt:P279* wd:Q506883.
} Union {
?floss p:P31 ?val.
?val ps:P31/wdt:P279* wd:Q341.
} Union {
?floss p:P31 ?val.
?val ps:P31/wdt:P279* wd:Q1130645.
}
?floss p:P31 ?val2.
filter(?val2 != ?val).
?val2 ps:P31 ?type.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de" .
}
} group by ?typeLabel order by desc(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?count")
v4("?floss")
v5("?type")
v6("?typeLabel"):::projected
v3("?val")
v2("?val2")
a1((" "))
a2((" "))
a3((" "))
c10(["de"]):::literal
c4(["wd:Q506883"]):::iri
c8(["bd:serviceParam"]):::iri
c6(["wd:Q1130645"]):::iri
c5(["wd:Q341"]):::iri
f0[["?val2 != ?val"]]
f0 --> v2
f0 --> v3
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;
v4 --"p:P31"--> v3
v3 --"p:statement/P31"--> a3
a3 --"p:direct/P279"--> c6
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v4 --"p:P31"--> v3
v3 --"p:statement/P31"--> a2
a2 --"p:direct/P279"--> c5
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"p:P31"--> v3
v3 --"p:statement/P31"--> a1
a1 --"p:direct/P279"--> c4
end
union0r <== or ==> union0l
end
v4 --"p:P31"--> v2
v2 --"p:statement/P31"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind2[/"count(?typeLabel)"/]
v6 --o bind2
bind2 --as--o v7