Dreams:taxon-index: Difference between revisions
Jump to navigation
Jump to search
(→Taxons: Danish) |
|||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
SELECT | SELECT | ||
?mønstre | |||
?rapporter | ?rapporter | ||
?takson ?taksonLabel | ?takson ?taksonLabel | ||
Line 10: | Line 11: | ||
WITH { | WITH { | ||
SELECT | SELECT | ||
(COUNT(DISTINCT ? | (COUNT(DISTINCT ?mønster) AS ?mønstre) | ||
(COUNT(DISTINCT ?rapport) AS ?rapporter) | |||
?takson | ?takson | ||
WHERE { | WHERE { | ||
? | ?takson dreamst:P2 dreams:Q215 . | ||
OPTIONAL { ?rapport dreamst:P28 ?takson . } | |||
OPTIONAL { ?mønster dreamst:P55 ?takson . } | |||
} | } | ||
GROUP BY ?takson | GROUP BY ?takson | ||
Line 21: | Line 25: | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". } | ||
} | } | ||
ORDER BY DESC(?rapporter) | ORDER BY DESC(?mønstre) DESC(?rapporter) | ||
}} | }} |
Latest revision as of 14:05, 15 March 2023
Taksoner
PREFIX dreams: <https://dreams.wikibase.cloud/entity/> PREFIX dreamst: <https://dreams.wikibase.cloud/prop/direct/> SELECT ?mønstre ?rapporter ?takson ?taksonLabel (CONCAT("#taxon/", SUBSTR(STR(?takson), 38)) AS ?taksonUrl) WITH { SELECT (COUNT(DISTINCT ?mønster) AS ?mønstre) (COUNT(DISTINCT ?rapport) AS ?rapporter) ?takson WHERE { ?takson dreamst:P2 dreams:Q215 . OPTIONAL { ?rapport dreamst:P28 ?takson . } OPTIONAL { ?mønster dreamst:P55 ?takson . } } GROUP BY ?takson } AS %result WHERE { INCLUDE %result SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],da,en". } } ORDER BY DESC(?mønstre) DESC(?rapporter)