Dreams:author: Difference between revisions

From DREAMS
Jump to navigation Jump to search
(publication_date)
Line 8: Line 8:


SELECT  
SELECT  
  ?publication_date
   ?report ?reportLabel ?reportUrl
   ?report ?reportLabel ?reportUrl
WHERE {
WHERE {
   ?report dreamst:P24 target: .
   ?report dreamst:P24 target: .
   BIND(CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl)
   BIND(CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl)
  OPTIONAL {
    ?report dreamsp:P6 / dreamspsv:P6 ?publication_date_value .
    ?publication_date_value wikibase:timePrecision ?time_precision ;
                            wikibase:timeValue ?publication_date_ .
    BIND(IF(?time_precision = 9, YEAR(?publication_date_), xsd:date(?publication_date_)) AS ?publication_date)
  }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en". }
}
}
ORDER BY DESC(?publication_date)
}}
}}

Revision as of 19:15, 31 August 2022

Reports

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 
  ?publication_date
  ?report ?reportLabel ?reportUrl
WHERE {
  ?report dreamst:P24 target: .
  BIND(CONCAT("#report/", SUBSTR(STR(?report), 38)) AS ?reportUrl)

  OPTIONAL {
    ?report dreamsp:P6 / dreamspsv:P6 ?publication_date_value .
    ?publication_date_value wikibase:timePrecision ?time_precision ;
                            wikibase:timeValue ?publication_date_ .
    BIND(IF(?time_precision = 9, YEAR(?publication_date_), xsd:date(?publication_date_)) AS ?publication_date)
  }

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