query-147004765b5b9f5435c68cb0c1661d39
Propertiesinstance of (P31)subclass of (P279)author (P50)
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?author ?authorLabel ?sitelinks (COUNT(DISTINCT ?series) AS ?seriesCount) (GROUP_CONCAT(?seriesQ;SEPARATOR=" | ") AS ?seriesList) #(GROUP_CONCAT(DISTINCT ?languageLabel) AS ?langs)
WHERE {
?series wdt:P31/wdt:P279* wd:Q277759 ;
wdt:P50 ?author .
MINUS {?series wdt:P31 wd:Q3331189}
?author wikibase:sitelinks ?sitelinks .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,zh".
?author rdfs:label ?authorLabel .
?series rdfs:label ?seriesLabel .
?language rdfs:label ?languageLabel .
}
BIND(STR(?seriesLabel) AS ?seriesQ)
}
GROUP BY ?author ?authorLabel ?sitelinks
HAVING (?seriesCount > 1)
ORDER BY DESC(?sitelinks)
LIMIT 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?author"):::projected
v5("?authorLabel"):::projected
v7("?language")
v8("?languageLabel")
v3("?series"):::projected
v10("?seriesCount")
v6("?seriesLabel")
v10("?seriesList")
v9("?seriesQ"):::projected
v1("?sitelinks"):::projected
a1((" "))
c4(["wd:Q277759"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en,zh"]):::literal
c9(["bd:serviceParam"]):::iri
c6(["wd:Q3331189"]):::iri
f0[["?seriesCount > '1^^xsd:integer'"]]
f0 --> v10
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
v3 --"wdt:P50"--> v4
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P31"--> c6
end
v4 --"wikibase:sitelinks"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
v4 --"rdfs:label"--> v5
v3 --"rdfs:label"--> v6
v7 --"rdfs:label"--> v8
end
bind2[/"str(?seriesLabel)"/]
v6 --o bind2
bind2 --as--o v9
bind5[/"count(?series)"/]
v3 --o bind5
bind5 --as--o v10
bind6[/"?seriesQ"/]
v9 --o bind6
bind6 --as--o v10