query-446e6fe948b9616e6a099c7c3aada9f5

rq turtle/ttl

NMaiaalmost(P31)instance of (Q5)human

Use at

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
  {
    [] schema:about ?author ; schema:isPartOf / wikibase:wikiGroup "wikisource" .
    ?author wikibase:sitelinks ?sitelinks . 
    ?author wdt:P31 wd:Q5 .
  }
  GROUP BY ?author
  HAVING (COUNT(?author) = 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" . }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?_anon_d00291b7e9a143df8ec0be8c8ebd714c150153") v5("?_anon_d00291b7e9a143df8ec0be8c8ebd714c150154") v2("?author"):::projected v3("?sitelinks") v1("?work") a4((" ")) a5((" ")) a2((" ")) a3((" ")) a1((" ")) c4(["wd:Q47461344"]):::iri c12(["bd:serviceParam"]):::iri c10(["wd:Q5"]):::iri c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal c8(["wikisource"]):::literal f0[[" "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P50"--> e0v2 e0v1 --"wdt:P31"--> e0a1 e0a1 --"wdt:P279"--> e0c4 e0v2("?author"):::projected e0v1("?work"):::projected e0a1((" ")):::projected e0c4(["wd:Q47461344"]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 f0 --> c2 f0 --> a1 f0 --> c3 f0 --> c4 v1 --"wdt:P50"--> v2 v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 f1[[" = "]] f1 --> a2 f1 --> a3 a4 --"schema:about"--> v2 a4 --"schema:isPartOf"--> a5 a5 --"wikibase:wikiGroup"--> c8 v2 --"wikibase:sitelinks"--> v3 v2 --"wdt:P31"--> c10 bind4[/"count(?author)"/] v2 --o bind4 bind4 --as--o v4 bind5[/"sample(?sitelinks)"/] v3 --o bind5 bind5 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end