Dreams:author

From DREAMS
Jump to navigation Jump to search

Rapporter

PREFIX target: <https://dreams.wikibase.cloud/entity/Q222>
PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>
PREFIX dreamsp: <https://dreams.wikibase.cloud/prop/>
PREFIX dreamspsv: <https://dreams.wikibase.cloud/prop/statement/value/> 

SELECT 
  ?udgivelsesdato
  ?rapport ?rapportLabel ?rapportUrl
WHERE {
  ?rapport dreamst:P24 target: .
  BIND(CONCAT("#report/", SUBSTR(STR(?rapport), 38)) AS ?rapportUrl)

  OPTIONAL {
    ?rapport dreamsp:P6 / dreamspsv:P6 ?udgivelsesdato_value .
    ?udgivelsesdato_value wikibase:timePrecision ?time_precision ;
                            wikibase:timeValue ?udgivelsesdato_ .
    BIND(IF(?time_precision = 9, YEAR(?udgivelsesdato_), xsd:date(?udgivelsesdato_)) AS ?udgivelsesdato)
  }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
ORDER BY DESC(?udgivelsesdato)