Dreams:author: Difference between revisions

From DREAMS
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Reports ==
== Rapporter ==
{{SPARQL | query=  
{{SPARQL | query=  
PREFIX target: <https://dreams.wikibase.cloud/entity/Q222>
PREFIX target: <https://dreams.wikibase.cloud/entity/Q222>
Line 8: Line 8:


SELECT  
SELECT  
   ?report ?reportLabel ?reportUrl
   ?udgivelsesdato
  ?rapport ?rapportLabel ?rapportUrl
WHERE {
WHERE {
   ?report dreamst:P24 target: .
   ?rapport dreamst:P24 target: .
   BIND(CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl)
   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". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
}
ORDER BY DESC(?udgivelsesdato)
}}
}}

Latest revision as of 13:29, 9 December 2022

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)