Wikidata:Synia:language-publisher-index

Synia: language - publishers

edit
PREFIX target: <http://www.wikidata.org/entity/Q9035>

SELECT 
  ?description ?descriptionLabel
  ("#language" AS ?descriptionUrl)

  ?value ?valueLabel ?valueUrl

  ?wikidata ?wikidataUrl

  ?scholia ?scholiaUrl

  ?ordia ?ordiaUrl

WHERE {
  {
    BIND(1 AS ?order)
    BIND(wd:Q34770 AS ?description)
    
    BIND(target: AS ?value)
    BIND(CONCAT("#language/", SUBSTR(STR(target:), 32)) AS ?valueUrl)
    
    BIND("Wikidata&nbsp;↗" AS ?wikidata)
    BIND(CONCAT("https://www.wikidata.org/wiki/", SUBSTR(STR(?value), 32)) AS ?wikidataUrl)

    BIND("Scholia&nbsp;↗" AS ?scholia)
    BIND(CONCAT("https://scholia.toolforge.org/language/", SUBSTR(STR(?value), 32)) AS ?scholiaUrl)

    BIND("Ordia&nbsp;↗" AS ?ordia)
    BIND(CONCAT("https://ordia.toolforge.org/language/", SUBSTR(STR(?value), 32)) AS ?ordiaUrl)

  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
ORDER BY ?order
Try it!

Publishers

edit
PREFIX target: <http://www.wikidata.org/entity/Q9035>

SELECT
  ?works
  (CONCAT("#language/", SUBSTR(STR(target:), 32), "/publisher/", SUBSTR(STR(?publisher), 32)) AS ?worksUrl) 
 
  ?publisher ?publisherLabel
  (CONCAT("#publisher/", SUBSTR(STR(?publisher), 32)) AS ?publisherUrl) 
  ?publisherDescription
WITH {
  SELECT
    (COUNT(?work) AS ?works)
    ?publisher
  WHERE {
    ?work wdt:P123 ?publisher ;
          wdt:P407 target: .
  }
  GROUP BY ?publisher
} AS %publishers
WHERE {
  INCLUDE %publishers
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
ORDER BY DESC(?works)
Try it!