query-0508c618b0f6ffeca353aa12f10f8d16
. I had to include that limitation to avoid timeout. (Q5)human (P31)instance of what you requested. It excludes the authors from other projects than Wikisource by checking that the number of counted Wikisources equals the total number of sitelinks. The difference from the request is that the query only includes authors which are almost: I made a query which is NMaia@ 01:31, 14 December 2020 (UTC)) talk (NMaia: It can link to more than one Wikisource. Only one would be unnecessarily limiting. Dipsacus fullonum@ 20:12, 13 December 2020 (UTC)) talk (Dipsacus fullonum, did you mean authors with links to more than one Wikisource? --NMaiaThat query only finds authors with link to one Wikisource. The request said "links to Wikisource" (plural). : I found a way to get all results at once without timeout. This query finds approx. 4232 authors where the previous two queries each found about 2366 humans and 1869 other authors. NMaia @
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?author ?authorLabel
WHERE
{
{
SELECT ?author
WHERE
{
{
SELECT ?author
{
?wikisource schema:about ?author ; schema:isPartOf / wikibase:wikiGroup "wikisource" .
?author wikibase:sitelinks ?sitelinks .
?work wdt:P50 ?author .
}
GROUP BY ?author
HAVING (COUNT(DISTINCT ?wikisource) = SAMPLE(?sitelinks))
} FILTER EXISTS
{
?work wdt:P50 ?author .
?work wdt:P31/wdt:P279* wd:Q47461344 . # Written work exists
}
}
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}