Wikidata:Synia:editor

From Wikidata
Jump to navigation Jump to search

Synia: Editor

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

SELECT
  ?description ?descriptionLabel
  ("#editor/" AS ?descriptionUrl)

  ?value ?valueLabel

  ?wikidata ?wikidataUrl

WHERE {
  {
    BIND(1 AS ?order)
    BIND(wd:Q1607826 AS ?description)
    BIND(target: AS ?value)
    
    BIND(CONCAT(SUBSTR(STR(target:), 32), "&nbsp;↗") AS ?wikidata)
    BIND(CONCAT("https://www.wikidata.org/wiki/", SUBSTR(STR(target:), 32)) AS ?wikidataUrl)
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?order
Try it!

Edited works

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

SELECT
  ?publication_date

  ?work ?workLabel
  (CONCAT("#work/", SUBSTR(STR(?work), 32)) AS ?workUrl)

WHERE {
  ?work wdt:P98 target: .
  OPTIONAL {
    ?work wdt:P577 ?publication_datetime .
    BIND(xsd:date(?publication_datetime) AS ?publication_date)
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?publication_date)
Try it!

Coeditors

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

SELECT
  ?works

  ?coeditor ?coeditorLabel
  (CONCAT("#editor/", SUBSTR(STR(?coeditor), 32)) AS ?coeditorUrl)
  ?coeditorDescription

  ?example_work ?example_workLabel
WITH {
  SELECT
    (COUNT(?work) AS ?works)
    ?coeditor 
    (SAMPLE(?work) AS ?example_work)
  WHERE {
    ?work wdt:P98 target: , ?coeditor .
    FILTER (target: != ?coeditor)
  }
  GROUP BY ?coeditor
} AS %coeditors
WHERE {
  INCLUDE %coeditors
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?works)
Try it!