Wikidata:Synia:country-author-index

From Wikidata
Jump to navigation Jump to search

Synia: Country - author

[edit]

Authors

[edit]
PREFIX target: <http://www.wikidata.org/entity/Q35>

SELECT 
  ?works

  ?author ?authorLabel
  (CONCAT("/#author/", SUBSTR(STR(?author), 32)) AS ?authorUrl)
  ?authorDescription

  ?example_work ?example_workLabel
WITH {
  SELECT 
    (COUNT(DISTINCT ?work) AS ?works)
    ?author
    (SAMPLE(?work) AS ?example_work)
  WHERE {
    ?author wdt:P27| (wdt:P108 / wdt:P17) target: ;
            ^wdt:P50 ?work .
  }
  GROUP BY ?author
} AS %authors
WHERE {
  INCLUDE %authors
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?works)
LIMIT 500
Try it!