Dreams:taxon-index: Difference between revisions

From DREAMS
Jump to navigation Jump to search
(→‎Taxons: taxonUrl)
Line 7: Line 7:
   ?reports
   ?reports
   ?taxon ?taxonLabel
   ?taxon ?taxonLabel
  (CONCAT("#taxon/", SUBSTR(STR(?taxon), 38)) AS ?taxonUrl)
WITH {
WITH {
   SELECT
   SELECT

Revision as of 14:05, 26 August 2022

Taxons

PREFIX dreams: <https://dreams.wikibase.cloud/entity/>
PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/>

SELECT 
  ?reports
  ?taxon ?taxonLabel
  (CONCAT("#taxon/", SUBSTR(STR(?taxon), 38)) AS ?taxonUrl)
WITH {
  SELECT
    (COUNT(DISTINCT ?report) AS ?reports)
    ?taxon
  WHERE {
    ?report dreamst:P28 ?taxon .
  }
  GROUP BY ?taxon
} AS %result
WHERE {
  INCLUDE %result
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". }
}
ORDER BY DESC(?reports)