query-a76ea739dcb9b004beeae36f8d697a1b
OS
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#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?os ?label (COUNT (DISTINCT ?floss) as ?count) WHERE {
{
?floss p:P31/ps:P31/wdt:P279* wd:Q506883.
} Union {
?floss p:P31/ps:P31/wdt:P279* wd:Q341.
} Union {
?floss p:P31/ps:P31/wdt:P279* wd:Q1130645.
} Union {
?floss p:P31/ps:P31/wdt:P279* wd:Q19652.
?floss p:P31/ps:P31/wdt:P279* wd:Q7397.
}
?floss wdt:P306 ?os.
OPTIONAL { ?os rdfs:label ?label filter (lang(?label) = "en") .}
} group by ?os ?label order by desc(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v3("?floss"):::projected
v2("?label"):::projected
v4("?os"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
a6((" "))
a7((" "))
a8((" "))
a9((" "))
a10((" "))
c9(["wd:Q7397"]):::iri
c5(["wd:Q506883"]):::iri
c7(["wd:Q1130645"]):::iri
c8(["wd:Q19652"]):::iri
c6(["wd:Q341"]):::iri
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;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v3 --"p:P31"--> a7
a7 --"p:statement/P31"--> a8
a8 --"p:direct/P279"--> c8
v3 --"p:P31"--> a9
a9 --"p:statement/P31"--> a10
a10 --"p:direct/P279"--> c9
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v3 --"p:P31"--> a5
a5 --"p:statement/P31"--> a6
a6 --"p:direct/P279"--> c7
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v3 --"p:P31"--> a3
a3 --"p:statement/P31"--> a4
a4 --"p:direct/P279"--> c6
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"p:P31"--> a1
a1 --"p:statement/P31"--> a2
a2 --"p:direct/P279"--> c5
end
union0r <== or ==> union0l
end
v3 --"p:direct/P306"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."rdfs:label".-> v2
end
bind1[/"count(?floss)"/]
v3 --o bind1
bind1 --as--o v5