query-92571e46c6ab9ff4ddc562a48cae1142
Propertiesinstance of (P31)VIAF ID (P214)publisher (P123)
Use at
- https://query.wikidata.org/sparql
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT DISTINCT ?publisherLabel ?publisher ?typeLabel ?viafURI (COUNT(?publisher) as ?count)
WHERE {
?publisher wdt:P31 ?type.
OPTIONAL {?publisher wdt:P214 ?viaf}
{ ?publisher wdt:P31 wd:Q2085381}
UNION
{ ?s wdt:P123 ?publisher . }
BIND (URI(CONCAT("http://viaf.org/viaf/",?viaf)) AS ?viafURI)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
GROUP BY ?publisher ?publisherLabel ?typeLabel ?viafURI
ORDER BY DESC(?count)
LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?count")
v2("?publisher"):::projected
v5("?s")
v3("?type")
v4("?viaf")
v6("?viafURI"):::projected
c6(["bd:serviceParam"]):::iri
c3(["wd:Q2085381"]):::iri
c8(["en"]):::literal
v2 --"wdt:P31"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P214".-> v4
end
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v5 --"wdt:P123"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c3
end
union0r <== or ==> union0l
end
bind0[/"concat('http://viaf.org/viaf/',?viaf)"/]
v4 --o bind0
bind0 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind2[/"count(?publisher)"/]
v2 --o bind2
bind2 --as--o v7