query-de7dba2a005b6fc62901fc22b61bbef4
doctoral theses with more than one (best-rank) author SELECT ?thesis ?thesisLabel (GROUP_CONCAT(?authorLabel; separator = ", ") AS ?authors) WITH { SELECT ?thesis WHERE { ?thesis wdt:P31/(wdt:P279|wdt:P460)* wd:Q187685; wdt:P50 ?author. } GROUP BY ?thesis HAVING(COUNT(?author) > 1) } AS %theses WHERE { INCLUDE %theses. ?thesis wdt:P50 ?author. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,de". ?thesis rdfs:label ?thesisLabel. ?author rdfs:label ?authorLabel. } } GROUP BY ?thesis ?thesisLabel ORDER BY DESC(COUNT(?author))
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#>
# doctoral theses with more than one (best-rank) author
SELECT ?thesis ?thesisLabel (GROUP_CONCAT(?authorLabel; separator = ", ") AS ?authors)
WHERE {
{
SELECT ?thesis WHERE {
?thesis wdt:P31/(wdt:P279|wdt:P460)* wd:Q187685;
wdt:P50 ?author.
}
GROUP BY ?thesis
HAVING(COUNT(?author) > 1)
}
?thesis wdt:P50 ?author.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,de".
?thesis rdfs:label ?thesisLabel.
?author rdfs:label ?authorLabel.
}
}
GROUP BY ?thesis ?thesisLabel
ORDER BY DESC(COUNT(?author))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?_anon_42b5416610844a34809f33a099ae9de1114565")
v6("?_anon_42b5416610844a34809f33a099ae9de1114570")
v2("?author")
v5("?authorLabel"):::projected
v7("?authors")
v1("?thesis"):::projected
v4("?thesisLabel"):::projected
a3((" "))
a2((" "))
a1((" "))
c4(["wd:Q187685"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en,fr,de"]):::literal
f0[[" > '1^^xsd:integer'"]]
f0 --> a2
v1 --"wdt:P31"--> a3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
a3 --"wdt:P460"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
a3 --"wdt:P279"--> c4
end
union0r <== or ==> union0l
end
v1 --"wdt:P50"--> v2
bind2[/"count(?author)"/]
v2 --o bind2
bind2 --as--o v3
v1 --"wdt:P50"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
v1 --"rdfs:label"--> v4
v2 --"rdfs:label"--> v5
end
bind5[/"count(?author)"/]
v2 --o bind5
bind5 --as--o v6
bind6[/"?authorLabel"/]
v5 --o bind6
bind6 --as--o v7