query-245c3ef3f9565ec154d89f09917ea901

rq turtle/ttl

Propertiesmaintained by WikiProject (P6104)author name string (P2093)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
  # Number of works on the topic with the author name string
  ?count

  # Number of works with the author name string
  ?count1

  # Author as a string
  ?authorstring

  # Build URL to the Author disambiguator tool
  (CONCAT(
      'https://tools.wmflabs.org/author-disambiguator/names_oauth.php?name=',
      ENCODE_FOR_URI(?authorstring)) AS ?resolver_url)
WHERE {
   {
  SELECT
    (COUNT(DISTINCT ?work) AS ?count)
    (COUNT(DISTINCT ?work1) AS ?count1)
    ?authorstring
  WHERE {
     {
  SELECT DISTINCT ?work ?authorstring WHERE {
    SERVICE bd:sample { ?work wdt:P6104 wd:Q56241615 . bd:serviceParam bd:sample.limit 100000 }   
    ?work wdt:P2093 ?authorstring .
  }
  LIMIT 10000
}    ?work1 wdt:P2093 ?authorstring .
  }
  GROUP BY ?authorstring
}}
ORDER BY DESC(?count) DESC(?count1)
LIMIT 200

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?authorstring"):::projected v6("?count"):::projected v6("?count1"):::projected v6("?resolver_url") v3("?work") v5("?work1") c4(["bd:serviceParam"]):::iri c3(["wd:Q56241615"]):::iri c6(["100000^^xsd:integer"]):::literal subgraph s1["http://www.bigdata.com/rdf#sample"] style s1 stroke-width:4px; v3 --"wdt:P6104"--> c3 c4 --"bd:sample.limit"--> c6 end v3 --"wdt:P2093"--> v4 v5 --"wdt:P2093"--> v4 bind2[/"count(?work)"/] v3 --o bind2 bind2 --as--o v6 bind3[/"count(?work1)"/] v5 --o bind3 bind3 --as--o v6 bind4[/"concat('https://tools.wmflabs.org/author-disambiguator/names_oauth.php?name=',encode-for-uri(?authorstring))"/] v4 --o bind4 bind4 --as--o v6