query-f50f2ca2ad4140e29880bee0d0fc4a8d
Licenses
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 DISTINCT ?value ?valueLabel (COUNT(DISTINCT(?item)) as ?count) WHERE {
{
?item p:P275 ?license.
?license ps:P275 ?value.
?value wdt:P31?/wdt:P279* wd:Q1156659.
} Union {
?item p:P275 ?license.
?license ps:P275 ?value.
?value wdt:P31?/wdt:P279* wd:Q3943414.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} GROUP BY ?value ?valueLabel ORDER BY ?valueLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v2("?item"):::projected
v3("?license")
v4("?value"):::projected
v1("?valueLabel"):::projected
a1((" "))
a2((" "))
c8(["bd:serviceParam"]):::iri
c5(["wd:Q1156659"]):::iri
c10(["en"]):::literal
c6(["wd:Q3943414"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"p:P275"--> v3
v3 --"p:statement/P275"--> v4
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v4 --"p:direct/P31"--> a2
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
end
union1r <== or ==> union1l
end
a2 --"p:direct/P279"--> c6
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"p:P275"--> v3
v3 --"p:statement/P275"--> v4
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v4 --"p:direct/P31"--> a1
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
end
union2r <== or ==> union2l
end
a1 --"p:direct/P279"--> c5
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind1[/"count(?item)"/]
v2 --o bind1
bind1 --as--o v5