query-bdd9b700088d427a02c9673e9c9f9993

rq turtle/ttl

Etymological Dictionary of Succulent Plant Names (Q21500983)

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?taxonName ?pages ?namedAfterLabel {
  ?item wdt:P138 ?namedAfter .
  ?item wdt:P225 ?taxonName .
  ?item p:P138 ?statement .
  ?statement prov:wasDerivedFrom ?refnode .
  ?refnode pr:P248 ?ref
  OPTIONAL {?refnode pr:P304 ?pages }
  FILTER(sameTerm(?ref, wd:Q21500983)) #Etymological Dictionary of Succulent Plant Names 
  BIND(REPLACE(?pages, "-", "–") AS ?pages)
  BIND(if(contains(?pages,  "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
  BIND(if(contains(?pages,  "–"), strafter(?pages, "–"), ?pages) as ?endpage)  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(xsd:integer(?startpage)) ASC(?taxonName)

Query found at