User:Succu/SPARQL
Jump to navigation
Jump to search
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
External IDs[edit]
Statistic[edit]
SELECT ?taxonRankLabelDe (COUNT(?taxonRankLabelDe) AS ?countOfTaxonRank) WHERE {
?item wdt:P842 ?fossilworksId . # Fossilworks ID
?item wdt:P105 ?taxonRank .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de" .
?taxonRank rdfs:label ?taxonRankLabelDe .
}
}
GROUP BY ?taxonRankLabelDe
ORDER BY DESC(?countOfTaxonRank)
Constraint violation: Unique value[edit]
SELECT ?id (COUNT(?id) AS ?countOfId) (GROUP_CONCAT(?qId;SEPARATOR = ", ") AS ?qIds) WHERE {
?item wdt:P685 ?id .
BIND(str(?item) as ?url)
BIND(strafter(?url, "http://www.wikidata.org/entity/") as ?qId)
}
GROUP BY ?id
HAVING(?countOfId > 1)
ORDER BY DESC(?countOfId) ASC(xsd:integer(?id))
Basic taxon properties[edit]
SELECT ?item ?taxonName ?rank ?parentName ?parentRank ?id ?idTaxonName WHERE {
?item wdt:P225 ?taxonName .
#?item wdt:P105 wd:Q7432 . # species
?item wdt:P105 wd:Q35409 . # family
BIND(wd:Q35409 AS ?rank) .
#?item wdt:P105 ?rank .
?item wdt:P171/wdt:P225 ?parentName .
?item wdt:P171/wdt:P105 ?parentRank .
?item wdt:P685 ?id . # NCBI id
?item p:P685 ?idStatement .
?idStatement prov:wasDerivedFrom ?ref .
#?ref pr:P248 wd:Q82494 . # National Center for Biotechnology Information
OPTIONAL {?ref pr:P225 ?idTaxonName} .
}
#ORDER BY ASC(?taxonName)
Urls[edit]
SELECT ?item ?taxonName ?url ?urlBase ?urlId WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P1421 ?url1 . # P1348=AlgaeBase, P1421=GRIN, P1991=LPSN
#?item p:P1421 ?urlStatement .
#FILTER NOT EXISTS {
# ?urlStatement prov:wasDerivedFrom ?ref .
#}
BIND(str(?url1) as ?url)
BIND(if(contains(?url, "?"), strbefore(?url, "?"), ?url) as ?urlBase)
BIND(if(contains(?url, "?"), strafter(?url, "?"), ?url) as ?urlId)
}
#ORDER BY ASC(?taxonName)
LIMIT 1000
formatter URL (P1630)[edit]
SELECT ?item ?id ?uri
WHERE
{
wd:P3591 wdt:P1630 ?formaterUrl .
?item wdt:P3591 ?id.
BIND(URI(REPLACE(?formaterUrl,'\\$1', ?id)) AS ?uri)
}
ORDER BY ASC(xsd:integer(?id))
LIMIT 100
Taxa[edit]
General[edit]
Belongs taxon to a higher taxon[edit]
SELECT ?item ?taxonName ?taxonRank ?higherParentName WHERE {
BIND("Panthera leo" AS ?taxonName)
#BIND(wd:Q7432 AS ?taxonRank) # species
BIND(wd:Q7377 AS ?higherParent) # Mammalia
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P225 ?higherParentName .
}
ASK {
BIND("Panthera leo" AS ?taxonName)
BIND(wd:Q7377 AS ?higherParent) # Mammalia
?item (wdt:P171)* ?higherParent .
}
Selflink[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P171 ?item .
}
Fossil taxa[edit]
SELECT (count(*) as ?countOfFossilTaxa) WHERE {
?item wdt:P31 wd:Q23038290 .
}
taxon common name (P1843)[edit]
SELECT ?itemLink ?qId ?taxonName ?deCommonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P1843 ?deCommonName .
FILTER(lang(?deCommonName) = 'de' )
BIND(str(?item) as ?url)
BIND(strafter(?url, "http://www.wikidata.org/entity/") as ?qId)
BIND(uri(concat("https://www.wikidata.org/wiki/",?qId)) AS ?itemLink)
}
ORDER BY ASC(?taxonName)
Somevalue / novalue[edit]
Taxon name with somevalue[edit]
SELECT ?item ?itemLabel WHERE {
?item wdt:P225 ?taxonName .
FILTER(ISBLANK(?taxonName))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?itemLabel)
Taxon rank with novalue[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item p:P105 [a wdno:P105] .
}
ORDER BY ASC(?taxonName)
Wikidata rank (Wikidata statement rank (Q21044622))[edit]
Preferred[edit]
Taxa with a preferred taxon name[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item p:P225 ?statement .
?statement wikibase:rank wikibase:PreferredRank .
}
ORDER BY ASC(?taxonName)
Taxa with a preferred taxon rank[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item p:P105 ?statement .
?statement wikibase:rank wikibase:PreferredRank .
}
Taxa with a preferred parent taxon[edit]
SELECT ?item ?taxonName ?parentTaxon WHERE {
?item wdt:P225 ?taxonName .
?item p:P171 ?statement .
?statement wikibase:rank wikibase:PreferredRank .
?statement ps:P171/p:P225/ps:P225 ?parentTaxon .
}
Deprecated[edit]
Taxa with a deprecated taxon name[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item p:P225 ?statement .
?statement wikibase:rank wikibase:DeprecatedRank .
}
Taxa with a deprecated taxon rank[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item p:P105 ?statement .
?statement wikibase:rank wikibase:DeprecatedRank .
}
Taxa with a deprecated parent taxon[edit]
SELECT ?item ?taxonName ?parentTaxon WHERE {
?item wdt:P225 ?taxonName .
?item p:P171 ?statement .
?statement wikibase:rank wikibase:DeprecatedRank .
?statement ps:P171/p:P225/ps:P225 ?parentTaxon .
}
Possible issues[edit]
Rank and parent rank are the same[edit]
SELECT ?item ?taxonName ?taxonRank ?parentTaxonRank WHERE {
#BIND(wd:Q7432 AS ?taxonRank) # species
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
?item wdt:P171/wdt:P105 ?parentTaxonRank .
FILTER(sameTerm(?parentTaxonRank, ?taxonRank))
}
ORDER BY ASC(?taxonName)
Missing rank[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
OPTIONAL {?item wdt:P105 ?taxonRank }
FILTER(!bound(?taxonRank))
MINUS {?item rdf:type wdno:P105 }
}
Species with a family as parent taxon[edit]
SELECT ?item ?taxonName ?parentTaxonName ?parentTaxonRank WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q7432 .
?item wdt:P171/wdt:P225 ?parentTaxonName .
?item wdt:P171/wdt:P105 ?parentTaxonRank .
FILTER(sameTerm(?parentTaxonRank, wd:Q35409)) # family
MINUS {
SELECT ?item ?taxonName ?parentTaxonName ?parentTaxonRank WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q7432 .
?item wdt:P171/wdt:P225 ?parentTaxonName .
?item wdt:P171/wdt:P105 ?parentTaxonRank .
?item (wdt:P171)* wd:Q808 . # virus
}
}
#FILTER(STRENDS(?parentTaxonName, "aceae")) # plant family ( "idae" animal family)
}
ORDER BY ASC(?parentTaxonName) ASC(?taxonName)
Subspecies with wrong parent species[edit]
SELECT ?item ?taxonName ?parentTaxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q68947 . #subspecies
?item wdt:P171/wdt:P225 ?parentTaxonName .
FILTER (!strStarts(?taxonName, ?parentTaxonName))
}
ORDER BY ASC(?taxonName)
Misidentified subtribe[edit]
SELECT ?item ?taxonName ?parentTaxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q2455704 . # subfamily (-inae)
?item wdt:P171/wdt:P225 ?parentTaxonName .
?item wdt:P171/wdt:P105 ?parentTaxonRank .
FILTER(sameTerm(?parentTaxonRank, wd:Q227936)) # tribe
}
ORDER BY ASC(?parentTaxonName) ASC(?taxonName)
Genera without child taxa[edit]
SELECT ?item ?taxonName {
?item wdt:P105 wd:Q34740 .
MINUS { ?item ^wdt:P171 [] } .
#?item (wdt:P171)* wd:Q14560 . #parent taxon
OPTIONAL { ?item wdt:P225 ?taxonName } .
}
Plants with malformed subspecies names[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q68947 . #subspecies
?item (wdt:P171)* wd:Q11973077 . #Viridiplantae - timeout with plants
Filter(!regex(?taxonName, " subsp. "))
}
ORDER BY ASC(?item)
Plants with malformed variety names[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q767728 . #variety
?item (wdt:P171)* wd:Q11973077 . #Viridiplantae - timeout with plants
Filter(!regex(?taxonName, " var. "))
}
ORDER BY ASC(?item)
Malformed hybrid names[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
FILTER (CONTAINS(?taxonName, "× "))
}
ORDER BY ASC(?taxonName)
Incorrect family name[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q35409 . # family
FILTER(!(STRENDS(?taxonName, "idae") || STRENDS(?taxonName, "aceae")))
}
Incorrect subfamily name[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q2455704 . # subfamily
FILTER(!(STRENDS(?taxonName, "inae") || STRENDS(?taxonName, "oideae")))
}
Incorrect tribe name[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q227936 . # tribus
FILTER(!(STRENDS(?taxonName, "ini") || STRENDS(?taxonName, "eae")))
}
Misapplied basionym (P566)[edit]
SELECT ?item ?taxonName WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q729 . # Animalia
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
#?item wdt:P105 wd:Q7432 .
?item wdt:P566 ?basionym .
?item wdt:P225 ?taxonName .
}
Misapplied original combination (P1403)[edit]
SELECT ?item ?taxonName WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
#?item wdt:P105 wd:Q7432 .
?item wdt:P1403 ?protonym .
?item wdt:P225 ?taxonName .
}
Misapplied P5326 (P5326)[edit]
SELECT ?item ?taxonName ?title ?firstName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P5326/wdt:P1476 ?title .
OPTIONAL {?item wdt:P1403/wdt:P225 ?firstName} .
OPTIONAL {?item wdt:P566/wdt:P225 ?firstName} .
FILTER(BOUND(?firstName))
}
ORDER BY ASC(?taxonName)
basionym (P566) and original combination (P1403)[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P566 ?basionym .
?item wdt:P1403 ?protonym .
?item wdt:P225 ?taxonName .
}
Missing original combination (P1403)[edit]
SELECT ?item ?taxonName WHERE {
?item p:P225 ?taxonNameStatement .
?taxonNameStatement ps:P225 ?taxonName .
?taxonNameStatement pq:P31 ?isA .
OPTIONAL {?item wdt:P1403 ?protonym} .
FILTER(sameTerm(?isA, wd:Q14594740))
FILTER(!bound(?protonym))
}
ORDER BY ASC(?taxonName)
Wrong precision for year of publication of scientific name for taxon (P574)[edit]
SELECT ?item ?taxonName ?timeprecision WHERE {
?item p:P225 ?taxonNameStatement .
?taxonNameStatement ps:P225 ?taxonName .
?taxonNameStatement pqv:P574 ?date .
?date wikibase:timePrecision ?timeprecision .
FILTER(?timeprecision != "9"^^xsd:integer)
}
ORDER BY DESC(?timeprecision) ASC(?taxonName)
Missing mandatory properties[edit]
SELECT ?item ?taxonName ?taxonRank ?parentTaxon WHERE {
?item wdt:P31 wd:Q16521 . #taxon
OPTIONAL {?item wdt:P225 ?taxonName} .
OPTIONAL {?item wdt:P105 ?taxonRank} .
OPTIONAL {?item wdt:P171 ?parentTaxon} .
FILTER (!bound(?taxonName) || !bound(?taxonRank) || !bound(?parentTaxon))
}
#ORDER BY ?taxonName
LIMIT 2000
Duplicated pages[edit]
SELECT ?item ?taxonName WHERE {
VALUES ?taxon {wd:Q16521 wd:Q310890 wd:Q23038290} . # taxon, monotypic taxon, fossil taxon
?item p:P31/ps:P31 wd:Q17362920 . # duplicated page
?item p:P31/pq:P642 ?duplicateItem . # von
#?item p:P31/pq:P460 ?duplicateItem . # said to be the same as
?duplicateItem p:P31/ps:P31 ?taxon .
?duplicateItem p:P225/ps:P225 ?taxonName .
}
ORDER BY ASC(?taxonName)
Duplicated Wikispecies pages[edit]
SELECT ?item ?taxonName ?wikispeciesArticle WHERE {
VALUES ?taxon {wd:Q16521 wd:Q310890 wd:Q23038290} . # taxon, monotypic taxon, fossil taxon
?item p:P31/ps:P31 wd:Q17362920 . # duplicated page
?item p:P31/pq:P642 ?duplicateItem . # von
#?item p:P31/pq:P460 ?duplicateItem . # said to be the same as
?duplicateItem p:P31/ps:P31 ?taxon .
?duplicateItem p:P225/ps:P225 ?taxonName .
?article schema:about ?item ;
schema:isPartOf <https://species.wikimedia.org/> ;
schema:name ?wikispeciesArticle .
}
ORDER BY ASC(?taxonName)
[edit]
Belongs taxon to a nomenclatural Code[edit]
SELECT DISTINCT ?item ?taxonName ?nomenclaturalCode WHERE {
BIND("Panthera leo" AS ?taxonName)
BIND(wd:Q13011 AS ?nomenclaturalCode) # ICZN=Q13011, ICNafp=Q693148, ICNCP=Q941761, ICNB=Q743780, ICVCN=Q14920640
?item wdt:P225 ?taxonName .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 ?nomenclaturalCode .
}
Taxon names qualified with original spelling (P1353)[edit]
SELECT ?item ?taxonName ?originalSpelling WHERE {
?item p:P225 ?taxonNameStatement .
?taxonNameStatement ps:P225 ?taxonName .
?taxonNameStatement pq:P1353 ?originalSpelling .
}
ORDER BY ASC(?taxonName)
Taxon names qualified with nomenclatural status (P1135)[edit]
SELECT ?item ?taxonName ?nomenclaturalStatusLabel WHERE {
?item p:P225 ?taxonNameStatement .
?taxonNameStatement ps:P225 ?taxonName .
?taxonNameStatement pq:P1135 ?nomenclaturalStatus .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?nomenclaturalStatusLabel) ASC(?taxonName)
Later homonym, nomen illegitimum ...[edit]
SELECT ?item ?itemLabel ?kindOf WHERE {
{
?item wdt:P31 wd:Q17276484 . # later homonym
BIND("later homonym" AS ?kindOf) .
}
UNION {
?item wdt:P31 wd:Q1093954 . # nomen illegitimum
BIND("nomen illegitimum" AS ?kindOf) .
}
UNION {
?item wdt:P31 wd:Q17487588 . # unavailable for use
BIND("unavailable for use" AS ?kindOf) .
}
UNION {
?item wdt:P31 wd:Q15149791 . # nomen utique rejiciendum
BIND("nomen utique rejiciendum" AS ?kindOf) .
}
UNION {
?item wdt:P31 wd:Q28549151. # preoccupied name
BIND("preoccupied name" AS ?kindOf) .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
?item rdfs:label ?itemLabel .
}
}
ORDER BY ?itemLabel
Synonyms[edit]
List of basionyms (plantae, fungi) (basionym (P566))[edit]
SELECT ?item ?basionymName ?basionymOf WHERE {
?item wdt:P225 ?basionymOf .
#?item wdt:P105 wd:Q7432 . # species
?item wdt:P566/wdt:P225 ?basionymName .
#?item wdt:P566/wdt:P225 "Arequipa weingartiana" .
}
ORDER BY ASC(?basionymName)
SELECT DISTINCT ?item ?taxonName ?basionymOf WHERE {
?item wdt:P2868 wd:Q810198 . # basionym
?item wdt:P225 ?taxonName .
?item p:P2868 ?taxonNameStatement .
?taxonNameStatement pq:P642/wdt:P225 ?basionymOf
}
ORDER BY ASC(?taxonName) ASC(?basionymOf)
List of original combinations (animalia) (original combination (P1403))[edit]
SELECT ?item ?taxonName ?combinedTo WHERE {
?item wdt:P225 ?combinedTo .
#?item wdt:P105 wd:Q7432 . # species
?item wdt:P1403/wdt:P225 ?taxonName .
#?item wdt:P1403/wdt:P225 "Bufo viridis" .
}
ORDER BY ASC(?taxonName)
List of replaced names (replaced synonym (for nom. nov.) (P694))[edit]
SELECT ?item ?replacedName ?replacementOf WHERE {
?item wdt:P225 ?replacementOf .
#?item wdt:P105 wd:Q7432 . # species
?item wdt:P694/wdt:P225 ?replacedName .
#?item wdt:P694/wdt:P225 "Doronicum bellidiastrum" .
}
ORDER BY ASC(?replacedName)
List of synonyms (taxon synonym (P1420))[edit]
SELECT ?item ?synonymName ?synonymOf WHERE {
?item wdt:P225 ?synonymOf .
#?item wdt:P225 "Oreocereus hempelianus" .
#?item wdt:P105 wd:Q7432 . # species
#?item (wdt:P171)* wd:Q14560 . # Cactaceae
?item wdt:P1420/wdt:P225 ?synonymName .
}
ORDER BY ASC(?synonymName)
Cacti[edit]
List of all genera and species of cacti[edit]
SELECT ?item ?name WHERE {
?item wdt:P225 ?name .
{
?item wdt:P105 wd:Q7432 .
} UNION {
?item wdt:P105 wd:Q34740 .
}
?item (wdt:P171)* wd:Q14560 .
}
ORDER BY ASC(?name)
List of all genera and species of cacti with articles in dewiki[edit]
PREFIX schema: <http://schema.org/>SELECT ?item ?name ?article WHERE {
?item wdt:P225 ?name .
{
?item wdt:P105 wd:Q7432 .
} UNION {
?item wdt:P105 wd:Q34740 .
}
?item (wdt:P171)* wd:Q14560 .
OPTIONAL {
?article schema:about ?item .
?article schema:inLanguage "de" .
FILTER (SUBSTR(str(?article), 1, 25) = "https://de.wikipedia.org/")
}
}
ORDER BY ASC(?name)
List of cacti without german description[edit]
SELECT ?item ?taxonName ?taxonRankLabel ?parentTaxonName (GROUP_CONCAT(?lang) AS ?langs) WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
?item wdt:P171/wdt:P225 ?parentTaxonName .
?item (wdt:P171)* wd:Q14560 . # Cactaceae
OPTIONAL {?item schema:description ?itemDescription}
BIND(lang(?itemDescription) as ?lang)
SERVICE wikibase:label {bd:serviceParam wikibase:language "de" .}
}
GROUP BY ?item ?taxonName ?taxonRankLabel ?parentTaxonName
HAVING (!Contains(?langs, "de"))
ORDER BY ASC(?taxonName)
List of cacti with their synonyms[edit]
SELECT ?item ?taxonName ?synonymName WHERE {
?item wdt:P225 ?taxonName .
#?item wdt:P225 "Oreocereus hempelianus" . # only this species
#?item wdt:P105 wd:Q7432 . # species
?item (wdt:P171)* wd:Q14560 . # Cactaceae
?item wdt:P1420/wdt:P225 ?synonymName .
}
ORDER BY ASC(?taxonName)
List of cacti with their synonyms according to Das große Kakteen-Lexikon (Q13520496)[edit]
By accepted taxon name[edit]
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX q: <http://www.wikidata.org/prop/qualifier/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>PREFIX prov: <http://www.w3.org/ns/prov#> SELECT DISTINCT ?item ?acceptedTaxonName ?synonymName WHERE {
?item wdt:P225 ?acceptedTaxonName .
#?item wdt:P225 "Oreocereus hempelianus" . # only this species
#?item wdt:P105 wd:Q7432 . # species
?item (wdt:P171)* wd:Q14560 . # Cactaceae
?item wdt:P1420/wdt:P225 ?synonymName .
?synonymNameV v:P1420 ?synonymNameValue .
?synonymNameV prov:wasDerivedFrom ?ref .
?ref pr:P248 wd:Q13520496 . # Das große Kakteen-Lexikon
#?ref pr:P248 wd:Q10695694 . # New Cactus Lexicon
}
ORDER BY ASC(?acceptedTaxonName)|
By synonym[edit]
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX q: <http://www.wikidata.org/prop/qualifier/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>PREFIX prov: <http://www.w3.org/ns/prov#> SELECT DISTINCT ?item ?synonymName ?synonymOf WHERE {
?item wdt:P225 ?synonymOf .
#?item wdt:P225 "Oreocereus hempelianus" .
#?item wdt:P105 wd:Q7432 . # species
?item (wdt:P171)* wd:Q14560 . # Cactaceae
?item wdt:P1420/wdt:P225 ?synonymName .
?synonymNameV v:P1420 ?synonymNameValue .
?synonymNameV prov:wasDerivedFrom ?ref .
?ref pr:P248 wd:Q13520496 . # Das große Kakteen-Lexikon
#?ref pr:P248 wd:Q10695694 . # New Cactus Lexicon
}
ORDER BY ASC(?synonymName)|
Count of epithets[edit]
SELECT DISTINCT ?epithet (COUNT(?epithet) AS ?countOfEpithet) WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q14560 . # Plantae - times out
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
BIND(strbefore(?taxonName, " ") as ?genus)
BIND(strafter(?taxonName, " ") as ?epithet)
}
GROUP BY ?epithet
ORDER BY DESC(?countOfEpithet) ASC(?epithet)
Referenced with a paper[edit]
SELECT ?item ?taxonName ?referencedBy ?title ?pages ?bhl ?referenceHasRoleLabel WHERE {
BIND(wd:Q14560 AS ?higherParent)
?item (wdt:P171)* ?higherParent .
?item p:P225 ?taxonNameStatement .
?taxonNameStatement ps:P225 ?taxonName .
?taxonNameStatement prov:wasDerivedFrom ?ref .
?ref pr:P248 ?referencedBy .
?referencedBy wdt:P31 wd:Q13442814 . #scientific article
?referencedBy wdt:P1476 ?title .
OPTIONAL {?ref pr:P304 ?pages}
OPTIONAL {?ref pr:P687 ?bhl}
OPTIONAL {?ref pr:P6184 ?referenceHasRole}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?title) ASC(?pages)
Other[edit]
Taxa year of publication of scientific name for taxon (P574)[edit]
SELECT ?item ?taxonName ?year (SUBSTR(?published1, 1, 10) as ?published) ?publishedIn ?title WHERE {
?item p:P225 ?taxonNameStatement .
?taxonNameStatement ps:P225 ?taxonName .
?taxonNameStatement pq:P574 ?date .
?taxonNameStatement prov:wasDerivedFrom ?ref .
OPTIONAL {?ref pr:P248/wdt:P1476 ?title} .
OPTIONAL {?ref pr:P248/wdt:P577 ?published1} .
OPTIONAL {?ref pr:P248/wdt:P1433/wdt:P1476 ?publishedIn} .
BIND(xsd:integer(YEAR(?date)) as ?year)
#Filter(?year >= 2000)
Filter(?year = 2016)
#Filter(?year >= 2017)
}
ORDER BY DESC(?year) ASC(?taxonName)
Year in which Linnè described a species[edit]
SELECT ?item ?taxonName (YEAR(?date) as ?year) WHERE {
?item p:P105/ps:P105 wd:Q7432 . # Species
?item p:P225 ?taxonNameStatement .
?taxonNameStatement ps:P225 ?taxonName .
?taxonNameStatement pq:P405 wd:Q1043. # Carl von Linnè
OPTIONAL {?taxonNameStatement pq:P574 ?date}
}
ORDER BY ASC(?taxonName)
Species with a reference to Linnès Species Plantarum. 1st Edition (Q21856050)[edit]
SELECT ?item ?name ?volume ?pages WHERE {
VALUES ?sp {wd:Q21856106 wd:Q21856107} . # Species Plantarum, 1st Ed., Vol. 1+2
?item wdt:P225 ?name .
?item wdt:P105 wd:Q7432 .
?item p:P225 ?taxonName .
?taxonName ps:P225 ?taxonNameValue .
?taxonName pq:P405 wd:Q1043.
?taxonName prov:wasDerivedFrom ?ref .
?ref pr:P248 ?sp .
OPTIONAL {?ref pr:P304 ?pages}
BIND(if(sameTerm(?sp, wd:Q21856106), "1", "2") as ?volume)
BIND(REPLACE(?pages, "-", "–") AS ?pages)
BIND(REPLACE(?pages, "\\[1230\\]", "1230") AS ?pages)
BIND(REPLACE(?pages, "\\[1231\\]", "1231") AS ?pages)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
}
ORDER BY ASC(xsd:integer(?startpage)) ASC(?name)
#ORDER BY ASC(?name)|
Species from Linnès Species Plantarum. 1st Edition (Q21856050) used as basionym (P566)[edit]
SELECT ?basionymItem ?basionym (GROUP_CONCAT(?basionymOf;SEPARATOR = ", ") AS ?basionymOfList) WHERE {
VALUES ?sp {wd:Q21856106 wd:Q21856107} . # Species Plantarum, 1st ed., Vol. 1+2
?item wdt:P566 ?basionymItem .
?item wdt:P105 wd:Q7432 . # species
?item wdt:P225 ?basionymOf .
#?item p:P225 ?taxonNameStatement .
#?taxonNameStatement pq:P405 [] .
?basionymItem p:P225 ?basionymNameStatement .
?basionymNameStatement ps:P225 ?basionym .
?basionymNameStatement pq:P405 wd:Q1043 . # Linné
?basionymNameStatement prov:wasDerivedFrom ?ref .
?ref pr:P248 ?sp .
}
GROUP BY ?basionymItem ?basionym
ORDER BY ASC(?basionym)
Genera with a reference to Linnès Genera Plantarum (Q40975586)[edit]
SELECT ?item ?name ?pages ?bhlLink WHERE {
?item wdt:P225 ?name .
?item wdt:P105 wd:Q34740 .
?item p:P225 ?taxonName .
?taxonName ps:P225 ?taxonNameValue .
?taxonName pq:P405 wd:Q1043.
?taxonName prov:wasDerivedFrom ?ref .
?ref pr:P248 wd:Q40975586 .
OPTIONAL {?ref pr:P304 ?pages}
OPTIONAL {?ref pr:P687 ?bhl}
BIND(REPLACE(?pages, "-", "–") AS ?pages)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
BIND(uri(concat("http://biodiversitylibrary.org/page/",?bhl)) as ?bhlLink)
}
ORDER BY ASC(?name)
Taxa with a reference to Squirrels of the World (Q19597701)[edit]
SELECT ?item ?taxonName ?pages WHERE {
?item p:P225 ?statement .
?statement ps:P225 ?taxonName .
?statement prov:wasDerivedFrom ?ref .
?ref pr:P248 wd:Q19597701 . # Squirrels of the World
OPTIONAL {?ref pr:P304 ?pages}
}
ORDER BY ASC(?taxonName)
Publications[edit]
Journals[edit]
ZooKeys (Q219980)[edit]
SELECT ?item ?doi ?zoobankpub (SUBSTR(?published1, 1, 10) as ?published) ?volume ?issue ?pages ?title WHERE {
?item wdt:P1433 wd:Q219980 .
?item wdt:P356 ?doi .
OPTIONAL {?item wdt:P2007 ?zoobankpub} .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(strbefore(?pages, "–") as ?startpage)
BIND(strafter(?pages, "–") as ?endpage)
}
ORDER BY ASC(xsd:integer(?issue)) ASC(xsd:integer(?startpage))
PhytoKeys (Q14537320)[edit]
Articles[edit]
SELECT ?item ?doi (SUBSTR(?published1, 1, 10) as ?published) ?issue ?pages ?title WHERE {
?item wdt:P1433 wd:Q14537320 .
?item wdt:P356 ?doi .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(strbefore(?pages, "–") as ?startpage)
BIND(strafter(?pages, "–") as ?endpage)
}
ORDER BY ASC(xsd:integer(?issue)) ASC(xsd:integer(?startpage))
Nomenclatural acts[edit]
SELECT ?item ?taxonName ?state ?publication ?title {
?item p:P225 ?statement .
?statement ps:P225 ?taxonName .
?statement pq:P574 ?date .
?statement prov:wasDerivedFrom ?refnode .
?refnode pr:P248 ?ref
OPTIONAL {?refnode pr:P304 ?page }
OPTIONAL {?refnode pr:P6184 ?state_}
?ref wdt:P1433 wd:Q14537320 .
?ref wdt:P478 ?volume .
?ref wdt:P433 ?issue .
?ref wdt:P304 ?pages_ .
OPTIONAL {?ref wdt:P1476 ?title} .
BIND(if(!BOUND(?date), "", xsd:string(YEAR(?date))) as ?year)
BIND(if(sameTerm(?state_, wd:Q1361864), "tax. nov.", if(sameTerm(?state_, wd:Q14594740), "comb. nov.", if(sameTerm(?state_, wd:Q749462), "nom. nov.", ""))) as ?state)
BIND(CONCAT("PhytoKeys ", CONCAT(?issue, CONCAT(": ", CONCAT(?page, CONCAT(". ", ?year))))) AS ?publication)
FILTER(bound(?state))
}
ORDER BY ASC(?taxonName)
MycoKeys (Q21386351)[edit]
SELECT ?item ?doi (SUBSTR(?published1, 1, 10) as ?published) ?volume ?pages ?title WHERE {
?item wdt:P1433 wd:Q21386351 .
?item wdt:P356 ?doi .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(strbefore(?pages, "–") as ?startpage)
BIND(strafter(?pages, "–") as ?endpage)
}
ORDER BY ASC(xsd:integer(?volume)) ASC(xsd:integer(?startpage))
Biodiversity Data Journal (Q19370769)[edit]
SELECT ?item ?doi (SUBSTR(?published1, 1, 10) as ?published )?volume ?issue ?pages ?articleId ?title WHERE {
?item wdt:P1433 wd:Q19370769 .
?item wdt:P356 ?doi .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages} .
OPTIONAL {?item wdt:P2322 ?articleId} .
OPTIONAL {?item wdt:P1476 ?title} .
}
ORDER BY ASC(xsd:integer(?issue)) ASC(xsd:integer(?published))
Deutsche Entomologische Zeitschrift (Q4037265)[edit]
SELECT ?item ?doi ?zoobankpub (SUBSTR(?published1, 1, 10) as ?published) ?volume ?issue ?pages ?title WHERE {
?item wdt:P1433 wd:Q4037265 .
?item wdt:P356 ?doi .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P2007 ?zoobankpub} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(strbefore(?pages, "–") as ?startpage)
BIND(strafter(?pages, "–") as ?endpage)
FILTER (strStarts(?doi, "10.3897/DEZ"))
}
ORDER BY ASC(xsd:integer(?volume)) ASC(xsd:integer(?startpage))
Zootaxa (Q220370)[edit]
Articles[edit]
SELECT ?item ?doi ?zoobankpub (substr(?published1, 1, 10) as ?published )?volume ?issue ?pages ?title WHERE {
?item wdt:P1433 wd:Q220370 .
?item wdt:P356 ?doi .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P2007 ?zoobankpub} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(replace(?pages0, "-", "–") AS ?pages)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
}
ORDER BY ASC(xsd:integer(?volume)) ASC(xsd:integer(?issue)) ASC(xsd:integer(?startpage))
Number of articles by year[edit]
SELECT DISTINCT ?year (COUNT(?item) AS ?articles) WHERE {
?item wdt:P1433 wd:Q220370 .
OPTIONAL {?item wdt:P577 ?published} .
BIND(xsd:integer(YEAR(?published)) as ?year)
}
GROUP BY ?year
ORDER BY ASC(?year)
Wrong publication date precision[edit]
SELECT ?item (substr(?published1, 1, 10) as ?published) ?publishedNode ?timeprecision WHERE {
?item wdt:P31 wd:Q13442814 .
?item wdt:P1433 wd:Q220370 .
?item p:P577/ps:P577 ?published .
?item p:P577/psv:P577 ?publishedValueNode .
?publishedValueNode wikibase:timePrecision ?timeprecision .
FILTER(?timeprecision != "11"^^xsd:integer)
}
Phytotaxa (Q4807825)[edit]
SELECT ?item ?doi (substr(?published1, 1, 10) as ?published )?volume ?issue ?pages ?title WHERE {
?item wdt:P1433 wd:Q4807825.
?item wdt:P356 ?doi .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(replace(?pages0, "-", "–") AS ?pages)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
}
ORDER BY ASC(xsd:integer(?volume)) ASC(xsd:integer(?issue)) ASC(xsd:integer(?startpage))
Taxon (Q2003024)[edit]
Articles[edit]
SELECT ?item (SUBSTR(?published1, 1, 10) as ?published )?volume ?issue ?pages ?doi ?jstor ?title WHERE {
?item wdt:P1433 wd:Q2003024 . # Taxon
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P356 ?doi} .
OPTIONAL {?item wdt:P888 ?jstor} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
FILTER (strStarts(?title, "("))
}
ORDER BY ASC(?published) ASC(xsd:integer(?issue)) ASC(xsd:integer(?startpage))
Search[edit]
# Find title by volume, issue and page
SELECT ?item (SUBSTR(?published1, 1, 10) as ?published) ?title ?volume ?issue ?pages WHERE {
?item wdt:P1433 wd:Q2003024 . # Taxon
BIND("26" as ?volume) .
#BIND("2-3" as ?issue) .
BIND("326" as ?page) .
BIND("1977" as ?year) .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P1476 ?title} .
?item wdt:P478 ?volume .
?item wdt:P433 ?issue .
?item wdt:P304 ?pages0 .
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
FILTER (xsd:integer(?page) >= xsd:integer(?startpage) && xsd:integer(?page) <= xsd:integer(?endpage))
FILTER (Year(?published1) = xsd:integer(?year))
}
ORDER BY ASC(?published) ASC(xsd:integer(?issue)) ASC(xsd:integer(?startpage))
Nomenclatural acts[edit]
SELECT ?item ?taxonName ?state ?publication ?title {
?item p:P225 ?statement .
?statement ps:P225 ?taxonName .
?statement pq:P574 ?date .
?statement prov:wasDerivedFrom ?refnode .
?refnode pr:P248 ?ref
OPTIONAL {?refnode pr:P304 ?page }
OPTIONAL {?refnode pr:P6184 ?state_} ?ref wdt:P1433 wd:Q2003024 .
?ref wdt:P478 ?volume .
?ref wdt:P433 ?issue .
?ref wdt:P304 ?pages_ .
OPTIONAL {?ref wdt:P1476 ?title} .
BIND(if(!BOUND(?date), "", xsd:string(YEAR(?date))) as ?year)
BIND(if(sameTerm(?state_, wd:Q1361864), "tax. nov.", if(sameTerm(?state_, wd:Q14594740), "comb. nov.", if(sameTerm(?state_, wd:Q749462), "nom. nov.", ""))) as ?state)
BIND(CONCAT("Taxon ", CONCAT(?volume, CONCAT( "(",CONCAT(?issue, CONCAT("): ", CONCAT(?page, CONCAT(". ", ?year))))))) AS ?publication)
FILTER(bound(?state))
}
ORDER BY ASC(?taxonName)
Feddes Repertorium Specierum Novarum Regni Vegetabilis (Q5550932)[edit]
SELECT ?item (SUBSTR(?published1, 1, 10) as ?published )?volume ?issue ?pages ?doi ?lang ?title WHERE {
?item wdt:P1433 wd:Q5550932 .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue0} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P356 ?doi} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(LANG(?title) AS ?lang)
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(REPLACE(?issue0, "-", "–") AS ?issue)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
BIND(if(contains(?issue, "–"), strbefore(?issue, "–"), ?issue) as ?startissue)
#FILTER (strStarts(?title, "("))
}
ORDER BY ASC(xsd:integer(?volume)) ASC(xsd:integer(?startissue)) ASC(xsd:integer(?startpage))
European Journal of Taxonomy (Q21386186)[edit]
SELECT ?item ?doi ?zoobankpub (substr(?published1, 1, 10) as ?published) ?issue ?pages ?title WHERE {
?item wdt:P1433 wd:Q21386186 .
?item wdt:P356 ?doi .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P2007 ?zoobankpub} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(replace(?pages0, "-", "–") AS ?pages)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
}
ORDER BY ASC(xsd:integer(?issue)) ASC(xsd:integer(?startpage))
Iczn[edit]
Directions and Opinions[edit]
SELECT ?item (SUBSTR(?published1, 1, 4) as ?published) ?title WHERE {
VALUES ?iczn {wd:Q6130489 wd:Q31205884 wd:Q15759939} . # Q6130489 = Smithsonian Miscellaneous Collections, Q31205884 = Opinions and declarations, Q15759939 = Bulletin of Zoological Nomenclature
?item wdt:P1433 ?iczn .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P1476 ?title} .
OPTIONAL {?item wdt:P687 ?bhlPage} .
BIND(strbefore(?title, " ") as ?type)
BIND(strafter(?title, " ") as ?tmp)
BIND(strbefore(?tmp, " ") as ?number)
BIND(replace(?number, "\\.", "") AS ?number)
BIND(replace(?number, ":", "") AS ?number)
BIND(replace(?number, ",", "") AS ?number)
FILTER (xsd:string(?type) = "Opinion" || xsd:string(?type) = "Direction")
FILTER (isNumeric(xsd:integer(?number)))
}
ORDER BY ASC(?type) ASC(xsd:integer(?number))
Taxonomic literature : a selective guide to botanical publications and collections with dates, commentaries and types (Q56649865)[edit]
SELECT ?item ?idString ?id ?ipniId ?title WHERE {
?item wdt:P5878 ?idString .
OPTIONAL {?item wdt:P2008 ?ipniId} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(REPLACE(?idString, "\\.", "") AS ?id)
#FILTER(CONTAINS(?idString, "."))
}
ORDER BY ASC(xsd:integer(?id))
Biodiversity Heritage Library (Q172266)[edit]
BHL page ID (P687): Usage as property[edit]
SELECT ?instanceOf (COUNT(?instanceOf) AS ?instanceOfCount) ?instanceOfLabel WHERE {
?item wdt:P687 ?pageId .
?item wdt:P31 ?instanceOf .
OPTIONAL {?instanceOf rdfs:label ?instanceOfLabel . FILTER(lang(?instanceOfLabel)="en") }
}
GROUP BY ?instanceOf ?instanceOfCount ?instanceOfLabel
ORDER BY DESC(?instanceOfCount)
BHL page ID (P687): Usage in reference[edit]
SELECT ?item ?taxonName ?bhlPageId {
?item p:P225 ?statement .
?statement ps:P225 ?taxonName .
?statement prov:wasDerivedFrom ?refnode .
?refnode pr:P687 ?bhlPageId
}
ORDER BY ASC(?taxonName)
BHL bibliography ID (P4327): Usage[edit]
SELECT ?instanceOf (COUNT(?instanceOf) AS ?instanceOfCount) ?instanceOfLabel WHERE {
?item wdt:P4327 ?publicationId .
?item wdt:P31 ?instanceOf .
OPTIONAL {?instanceOf rdfs:label ?instanceOfLabel . FILTER(lang(?instanceOfLabel)="en")}
}
GROUP BY ?instanceOf ?instanceOfCount ?instanceOfLabel
ORDER BY DESC(?instanceOfCount)
BHL bibliography ID (P4327): List[edit]
SELECT ?item ?publicationId ?title (YEAR(?published) as ?year) ?instanceOfLabel WHERE {
?item wdt:P4327 ?publicationId .
?item wdt:P31 ?instanceOf .
OPTIONAL {?item wdt:P1476 ?title} .
OPTIONAL {?item wdt:P577 ?published} .
OPTIONAL {?instanceOf rdfs:label ?instanceOfLabel . FILTER(lang(?instanceOfLabel)="en")}
#BIND(wd:Q732577 AS ?publicationType) # publication
BIND(wd:Q5633421 AS ?publicationType) # scientific journal
FILTER(sameTerm(?instanceOf, ?publicationType))
}
ORDER BY ASC(?instanceOfLabel) ASC(?title)
BHL creator ID (P4081): Usage[edit]
SELECT ?instanceOf (COUNT(?instanceOf) AS ?instanceOfCount) ?instanceOfLabel WHERE {
?item wdt:P4081 ?creatorId .
?item wdt:P31 ?instanceOf .
OPTIONAL {?instanceOf rdfs:label ?instanceOfLabel . FILTER(lang(?instanceOfLabel)="en")}
}
GROUP BY ?instanceOf ?instanceOfCount ?instanceOfLabel
ORDER BY DESC(?instanceOfCount)
BHL creator ID (P4081): List[edit]
SELECT DISTINCT ?item ?itemLabel (GROUP_CONCAT(?creatorId;SEPARATOR = ", ") AS ?creatorIds) ?ipniAuthorId WHERE {
?item wdt:P4081 ?creatorId .
?item wdt:P31 ?instanceOf .
OPTIONAL {?item wdt:P586 ?ipniAuthorId} .
OPTIONAL {?item rdfs:label ?itemLabel . FILTER(lang(?itemLabel)="en")}
BIND(wd:Q5 AS ?creatorType) # human
FILTER(sameTerm(?instanceOf, ?creatorType))
}
GROUP BY ?item ?itemLabel ?ipniAuthorId
Other stuff[edit]
Journals publishing articles with a DOI (P356)[edit]
SELECT DISTINCT ?title ?title_old WHERE {
?item wdt:P356 ?doi .
?item wdt:P1433/wdt:P1476 ?title .
OPTIONAL {?item wdt:P1433/wdt:P357 ?title_old } .
}
ORDER BY ASC(?title)
Top 100 of author name string (P2093)[edit]
SELECT DISTINCT ?shortname ?no_shortname WHERE {
?item wdt:P2093 ?shortname .
{
SELECT ?shortname (COUNT(?shortname) AS ?no_shortname) WHERE {
?item wdt:P2093 ?shortname .
}
GROUP BY ?shortname
HAVING(?no_shortname > 1)
}
}
ORDER BY DESC(?no_shortname)
LIMIT 100
Title with possible HTML tags[edit]
SELECT ?item ?title WHERE {
{
?item wdt:P356 ?doi .
?item wdt:P1476 ?title.
}
UNION {
?item wdt:P356 ?doi .
?item wdt:P357 ?title .
}
Filter(contains(?title, "<") || contains(?title, ">"))
}
ORDER BY ASC(?title)
scholarly article (Q13442814) without published in (P1433)[edit]
SELECT ?item ?doi WHERE {
?item wdt:P356 ?doi .
?item wdt:P31 wd:Q13442814 .
OPTIONAL {?item wdt:P1433 ?publishedIn} .
FILTER (!bound(?publishedIn))
}
ORDER BY ASC(?doi)
DOI in reference of taxon name (P225)[edit]
SELECT ?item ?taxonName ?doi ?statedIn WHERE {
?item p:P225 ?idStatement .
?item p:P225/ps:P225 ?taxonName .
?idStatement prov:wasDerivedFrom ?ref .
?ref pr:P356 ?doi .
OPTIONAL {?ref pr:P248 ?statedIn} .
FILTER(!bound(?statedIn))
#FILTER(bound(?statedIn) && !sameTerm(?statedIn, wd:Q13711410))
}
ORDER BY ASC(?taxonName)
reference has role (P6184) (Statistic)[edit]
SELECT DISTINCT ?role ?roleLabel (COUNT(?roleLabel) AS ?countOfRoleLabel) WHERE {
?item p:P225/ps:P225 ?taxonName .
?item p:P225 ?taxonNameStatement .
?taxonNameStatement prov:wasDerivedFrom ?ref .
?ref pr:P6184 ?role
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en". }
}
GROUP BY ?role ?roleLabel ?countOfRoleLabel
ORDER BY DESC(?countOfRoleLabel)
reference has role (P6184) (List)[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item p:P225/ps:P225 ?taxonName .
?item p:P225 ?taxonNameStatement .
?taxonNameStatement prov:wasDerivedFrom ?ref .
?ref pr:P6184 wd:Q14594740 #role=recombination
}
ORDER BY ASC(?taxonName)
Authors[edit]
botanist author abbreviation (P428)[edit]
Simple list[edit]
SELECT * WHERE {
?item wdt:P428 ?authorabbrev .
}
ORDER BY ASC(?authorabbrv)
Count[edit]
SELECT (count(*) as ?count) WHERE {
?item wdt:P428 ?authorabbrv .
}
Extended list[edit]
SELECT ?item ?authorabbrv ?itemLabelDe (SUBSTR(?birthdate1, 1, 10) as ?birthdate) (SUBSTR(?deathdate1, 1, 10) as ?deathdate) WHERE {
?item wdt:P428 ?authorabbrv .
OPTIONAL {?item wdt:P569 ?birthdate1} .
OPTIONAL {?item wdt:P570 ?deathdate1} .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de" .
?item rdfs:label ?itemLabelDe .
}
}
ORDER BY ASC(?authorabbrv)
Extended list (only with articles to dewiki)[edit]
SELECT ?item ?authorabbrv ?itemLabelDe (SUBSTR(?birthdate1, 1, 10) as ?birthdate) (SUBSTR(?deathdate1, 1, 10) as ?deathdate) ?article WHERE {
?item wdt:P428 ?authorabbrv .
?article schema:about ?item .
?article schema:inLanguage "de" .
FILTER (SUBSTR(str(?article), 1, 25) = "https://de.wikipedia.org/")
OPTIONAL {?item wdt:P569 ?birthdate1} .
OPTIONAL {?item wdt:P570 ?deathdate1} .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de" .
?item rdfs:label ?itemLabelDe .
}
}
ORDER BY ASC(?authorabbrv)
Possible issues with birth- and/or deathdate[edit]
SELECT ?item ?authorabbrv ?itemLabelDe (SUBSTR(?birthdate1, 1, 10) as ?birthdate) (SUBSTR(?deathdate1, 1, 10) as ?deathdate) WHERE {
?item wdt:P428 ?authorabbrv .
OPTIONAL {?item wdt:P569 ?birthdate1} .
OPTIONAL {?item wdt:P570 ?deathdate1} .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de" .
?item rdfs:label ?itemLabelDe .
}
{
SELECT ?authorabbrv (COUNT(?authorabbrv) AS ?no_authorabbrv) WHERE {
?item wdt:P428 ?authorabbrv .
OPTIONAL {?item wdt:P569 ?birthdate} .
OPTIONAL {?item wdt:P570 ?deathdate} .
}
GROUP BY ?authorabbrv
HAVING(?no_authorabbrv > 1)
}
}
ORDER BY ASC(?authorabbrv)
Missing IPNI author ID (P586) in reference[edit]
SELECT ?item ?authorAbbrev (SUBSTR(?birthdate1, 1, 4) as ?birthyear) (SUBSTR(?deathdate1, 1, 4) as ?deathyear) WHERE {
?item wdt:P428 ?authorAbbrev .
?item p:P428 ?authorabbrev1 .
?authorabbrev1 ps:P428 ?authorabbrevValue .
?authorabbrev1 prov:wasDerivedFrom ?ref .
OPTIONAL {?ref pr:P586 ?authorId} .
OPTIONAL {?item wdt:P569 ?birthdate1} .
OPTIONAL {?item wdt:P570 ?deathdate1} .
FILTER (!bound(?authorId))
}
ORDER BY ASC(?authorAbbrev)
ZooBank author ID (P2006)[edit]
TODO
Etymology[edit]
Etymological Dictionary of Succulent Plant Names (Q21500983)[edit]
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)
Plants named after a person ICNafp[edit]
Name is used as noun (Q1084)[edit]
Name ends with vowel (Q36244) or with -er[edit]
-i (Male (sex or gender (P21) = male (Q6581097)))[edit]
SELECT ?item ?taxonName ?personLabel ?genderLabel WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
#?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
OPTIONAL {?item wdt:P138 ?person} .
OPTIONAL {?item wdt:P138/wdt:P21 ?gender} .
FILTER((STRENDS(?taxonName, "i") && !STRENDS(?taxonName, "ii")))
FILTER(bound(?person))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?taxonName)
-ae (Female (sex or gender (P21)=female (Q6581072))[edit]
SELECT ?item ?taxonName ?personLabel ?genderLabel WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
#?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
OPTIONAL {?item wdt:P138 ?person} .
OPTIONAL {?item wdt:P138/wdt:P21 ?gender} .
FILTER((STRENDS(?taxonName, "ae") && !STRENDS(?taxonName, "iae")))
FILTER(bound(?person))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?taxonName)
TODO: Exception 1 - Single persons, ends with -a becomes -ae[edit]
TODO: Exception 2 - Multiple persons, ends with -a becomes -arum[edit]
Name ends with consonant (Q38035), but not with -er[edit]
-ii (Male sex or gender (P21)=male (Q6581097))[edit]
SELECT ?item ?taxonName ?personLabel ?genderLabel WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
#?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
OPTIONAL {?item wdt:P138 ?person} .
OPTIONAL {?item wdt:P138/wdt:P21 ?gender} .
FILTER((STRENDS(?taxonName, "ii")))
FILTER(bound(?person))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?taxonName)
-iae (Female (sex or gender (P21)=female (Q6581072))[edit]
SELECT ?item ?taxonName ?personLabel ?genderLabel WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
#?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
OPTIONAL {?item wdt:P138 ?person} .
OPTIONAL {?item wdt:P138/wdt:P21 ?gender} .
FILTER((STRENDS(?taxonName, "iae")))
FILTER(bound(?person))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?taxonName)
-iorum (Multiple males or a married couple (married couple (Q3046146)))[edit]
SELECT ?item ?taxonName ?personLabel ?isALabel WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
#?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
OPTIONAL {?item wdt:P138 ?person} .
OPTIONAL {?item wdt:P138/wdt:P31 ?isA} .
FILTER((STRENDS(?taxonName, "iorum")))
FILTER(bound(?person))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?taxonName)
-iarum (Multiple females)[edit]
SELECT ?item ?taxonName ?personLabel ?genderLabel WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
#?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
OPTIONAL {?item wdt:P138 ?person} .
OPTIONAL {?item wdt:P138/wdt:P21 ?gender} .
FILTER((STRENDS(?taxonName, "iarum")))
FILTER(bound(?person))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?taxonName)
Name is used as adjective (Q34698)[edit]
Nomenclatural codes (nomenclature code (Q2673092))[edit]
International Code of Nomenclature for algae, fungi, and plants (Q693148)[edit]
Appendices[edit]
Appendix I: Suppressed works (Q65690812)[edit]
# opera utique oppressa
SELECT ?item ?title WHERE {
?item p:P31 ?taxonNameStatement .
?taxonNameStatement prov:wasDerivedFrom ?ref .
?ref pr:P248 wd:Q65690812 .
?item wdt:P1476 ?title .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?title)
Appendix IIA: Conserved, protected, and rejected names of families of algae, fungi, pteridophytes, and fossils (Q65681854)[edit]
TODO
Appendix IIB: Conserved and rejected names of families of bryophytes and spermatophytes (Q65682475)[edit]
SELECT ?item ?taxonName ?nomenclaturalStatusLabel ?typeGenus ?typeGenusName ?typeSpeciesName ?typeSpeciesRoleLabel WHERE {
?item wdt:P105 wd:Q35409 . # family
?item p:P225 ?taxonNameStatement .
?taxonNameStatement ps:P225 ?taxonName .
?taxonNameStatement pq:P1135 ?nomenclaturalStatus .
?taxonNameStatement prov:wasDerivedFrom ?ref .
?ref pr:P248 wd:Q65682475 . # Appendix IIB
OPTIONAL {?item wdt:P427 ?typeGenus} .
OPTIONAL {?item wdt:P427/wdt:P225 ?typeGenusName} .
OPTIONAL {?typeGenus wdt:P427 ?typeSpecies} .
OPTIONAL {?typeGenus wdt:P427/wdt:P225 ?typeSpeciesName} .
OPTIONAL {?typeGenus p:P427/pq:P3831 ?typeSpeciesRole} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
#FILTER(!bound(?typeSpecies))
#MINUS {?typeGenus rdf:type wdno:P427}
}
ORDER BY ASC(?taxonName)
Appendix III: Conserved, protected, and rejected names of genera and subdivisions of genera (Q65706483)[edit]
SELECT ?item ?taxonName ?nomenclaturalStatusLabel ?typeSpeciesName ?typeSpeciesRoleLabel WHERE {
?item wdt:P105 wd:Q34740 . # genus
?item p:P225 ?taxonNameStatement .
?taxonNameStatement ps:P225 ?taxonName .
?taxonNameStatement pq:P1135 ?nomenclaturalStatus .
?taxonNameStatement prov:wasDerivedFrom ?ref .
?ref pr:P248 wd:Q65706483 . # Appendix III
OPTIONAL {?item wdt:P427 ?typeSpecies} .
OPTIONAL {?item wdt:P427/wdt:P225 ?typeSpeciesName} .
OPTIONAL {?item p:P427/pq:P3831 ?typeSpeciesRole} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
#FILTER(!bound(?typeSpecies))
#MINUS {?typeSpecies rdf:type wdno:P427}
}
ORDER BY ASC(?taxonName)
Appendix IV: Conserved, protected, and rejected names of species and infraspecific taxa (Q65706487)[edit]
TODO
ICN, Appendix V: Suppressed names (Q65706490)[edit]
TODO
Appendix VI: Binding decisions on descriptive statements (Q65706494)[edit]
TODO
Appendix VII: Binding decisions on confusability of names (Q65706499)[edit]
TODO
Herbaria[edit]
SELECT ?item ?indexHerbariumId WHERE {
?item wdt:P5858 ?indexHerbariumId .
}
ORDER BY ASC(?indexHerbariumId)
Types[edit]
Species[edit]
SELECT ?item ?taxonName ?nomenclaturalType ?nomenclaturalTypeLabel WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
?item wdt:P427 ?nomenclaturalType .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?taxonName)
Genera[edit]
SELECT ?item ?taxonName ?nomenclaturalType WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
?item wdt:P105 wd:Q34740 .
?item wdt:P225 ?taxonName .
?item wdt:P427/wdt:P225 ?nomenclaturalType .
}
ORDER BY ASC(?taxonName)
SELECT ?item ?taxonName ?nomenclaturalType WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in Q764 . # Fungi
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
?item wdt:P105 wd:Q34740 .
?item wdt:P225 ?taxonName .
?item wdt:P427/wdt:P225 ?nomenclaturalType .
}
ORDER BY ASC(?taxonName)
Autonyms (autonym (Q1837887))[edit]
Subspecies[edit]
SELECT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q68947 . #subspecies
FILTER(REGEX(?taxonName, "\\b(\\w+) subsp. (\\1)\\b")) #todo replace w+
#FILTER(REGEX(?taxonName, "\\b(\\w+) (\\1)\\b"))
}
ORDER BY ASC(?taxonName)
Species with only a single subspecies[edit]
SELECT ?speciesName (COUNT(?speciesName) AS ?countOfSpeciesName) (GROUP_CONCAT(?taxonName;SEPARATOR = ", ") AS ?taxonNames) WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q68947 . #subspecies
FILTER(REGEX(?taxonName, " subsp. "))
BIND(STRBEFORE(?taxonName, " subsp.") as ?speciesName)
}
GROUP BY ?speciesName
HAVING(?countOfSpeciesName = 1)
ORDER BY ASC(?countOfSpeciesName) ASC(?speciesName)
Subspecies autonyms with author[edit]
SELECT ?item ?taxonName WHERE {
?item p:P105/ps:P105 wd:Q68947 . # subspecies
?item p:P225/ps:P225 ?taxonName .
?item p:P225/pq:P405 [] .
FILTER(REGEX(?taxonName, "\\b(\\w+) subsp. (\\1)\\b")) #todo replace w+
}
ORDER BY ASC(?taxonName)
International Code of Zoological Nomenclature (Q13011)[edit]
Types[edit]
Species[edit]
SELECT ?item ?taxonName ?nomenclaturalType ?nomenclaturalTypeLabel WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q729 . # Animalia
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
?item wdt:P427 ?nomenclaturalType .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(?taxonName)
Genera[edit]
SELECT ?item ?taxonName ?nomenclaturalType WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q729 . # Animalia
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
?item wdt:P105 wd:Q34740 .
?item wdt:P225 ?taxonName .
?item wdt:P427/wdt:P225 ?nomenclaturalType .
}
ORDER BY ASC(?taxonName)
International Code of Nomenclature of Prokaryotes (Q743780)[edit]
Taxa[edit]
SELECT DISTINCT ?item ?taxonName ?taxonRankLabel WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?taxonName)
Ranks[edit]
SELECT DISTINCT ?taxonRankLabel (COUNT(?taxonRankLabel) AS ?countOfTaxonRank) WHERE {
?item wdt:P105 ?taxonRank .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
GROUP BY ?taxonRankLabel
ORDER BY DESC(?countOfTaxonRank)
Strains[edit]
SELECT ?item ?taxonName ?taxonRankLabel ?parentTaxon WHERE {
?item wdt:P31 wd:Q855769 .
OPTIONAL {?item wdt:P225 ?taxonName} .
OPTIONAL {?item wdt:P105 ?taxonRank} .
OPTIONAL {?item wdt:P171/wdt:P225 ?parentTaxon} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC (?taxonName)
Culture Collections[edit]
SELECT ?item ?itemLabel ?shortName WHERE {
?item wdt:P31 wd:Q64062850 .
OPTIONAL {?item wdt:P1813 ?shortName} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?shortName)
Publications[edit]
Notifications[edit]
SELECT ?item (SUBSTR(?published1, 1, 10) as ?published )?volume ?issue ?pages ?doi ?pubMedId ?title WHERE {
VALUES ?journalItems {wd:Q26827892 wd:Q26827884 wd:Q3511931} .
?item wdt:P1433 ?journalItems .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P356 ?doi} .
OPTIONAL {?item wdt:P698 ?pubMedId} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
FILTER (contains(lcase(?title), "notification that new names"))
}
ORDER BY ASC(?published) ASC(xsd:integer(?issue)) ASC(xsd:integer(?startpage))
gen. nov. / sp. nov. / subsp. nov. / comb. nov. / Candidatus[edit]
SELECT ?item (SUBSTR(?published1, 1, 10) as ?published )?volume ?issue ?pages ?doi ?pubMedId ?title WHERE {
VALUES ?journalItems {wd:Q26827892 wd:Q26827884 wd:Q3511931} .
?item wdt:P1433 ?journalItems .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P356 ?doi} .
OPTIONAL {?item wdt:P698 ?pubMedId} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(if(contains(?pages, "–"), strbefore(?pages, "–"), ?pages) as ?startpage)
BIND(if(contains(?pages, "–"), strafter(?pages, "–"), ?pages) as ?endpage)
FILTER (contains(lcase(?title), "gen. nov."))
#FILTER (contains(lcase(?title), "sp. nov."))
#FILTER (contains(lcase(?title), "subsp. nov."))
#FILTER (contains(lcase(?title), "comb. nov."))
#FILTER (contains(lcase(?title), "candidatus"))
}
ORDER BY ASC(?published) ASC(xsd:integer(?issue)) ASC(xsd:integer(?startpage))
Bergey's Manual of Systematics of Archaea and Bacteria (Q55953029)[edit]
SELECT ?item ?doi (SUBSTR(?published1, 1, 10) as ?published) ?pages ?title WHERE {
?item wdt:P1433 wd:Q55953029 .
?item wdt:P356 ?doi .
OPTIONAL {?item wdt:P577 ?published1} .
OPTIONAL {?item wdt:P478 ?volume} .
OPTIONAL {?item wdt:P433 ?issue} .
OPTIONAL {?item wdt:P304 ?pages0} .
OPTIONAL {?item wdt:P1476 ?title} .
BIND(REPLACE(?pages0, "-", "–") AS ?pages)
BIND(strbefore(?pages, "–") as ?startpage)
BIND(strafter(?pages, "–") as ?endpage)
}
ORDER BY ASC(?doi)
Rules[edit]
Naming[edit]
Violation of Rule 8 (Names of Taxa above the Rank of Order)[edit]
= class (Q37517) =[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q37517 .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!(STRENDS(?taxonName, "ia")))
}
ORDER BY ASC(?taxonName)
= subclass (Q5867051) =[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q5867051 .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!(STRENDS(?taxonName, "idae")))
}
ORDER BY ASC(?taxonName)
Violation of Rule 9 (Names of Taxa between Subclass and Genus)[edit]
= order (Q36602) =[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q36602 .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!(STRENDS(?taxonName, "ales")))
}
ORDER BY ASC(?taxonName)
= suborder (Q5867959) =[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q5867959 .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!(STRENDS(?taxonName, "ineae")))
}
ORDER BY ASC(?taxonName)
= family (Q35409) =[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q35409 .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!(STRENDS(?taxonName, "aceae")))
}
ORDER BY ASC(?taxonName)
= subfamily (Q2455704) =[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q2455704 .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!(STRENDS(?taxonName, "oideae")))
}
ORDER BY ASC(?taxonName)
= tribe (Q227936) =[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q227936 .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!(STRENDS(?taxonName, "eae"))) # TODO
}
ORDER BY ASC(?taxonName)
= subtribe (Q3965313) =[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q3965313 .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!(STRENDS(?taxonName, "inae"))) # TODO
}
ORDER BY ASC(?taxonName)
Violation of Rule 13a (Names of Subspecies)[edit]
SELECT DISTINCT ?item ?taxonName WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 wd:Q68947 .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
Filter(!REGEX(?taxonName, " subsp. "))
}
ORDER BY ASC(?taxonName)
Nomenclatural Types[edit]
TODO: Two Codes Cyanophyceae (Q18575364) vs. Cyanobacteria (Q93315) (see Taxonomy of cyanobacteria: a contribution to consensus approach (Q59395002))
Violation of Rule 18a (Type of a Species or Subspecies)[edit]
# in special cases the place of the type strain may be taken Species by a description, preserved specimen, or an illustration (see Rule 18a(1))
SELECT DISTINCT ?item ?taxonName ?nomenclaturalType ?rankOfNomenclaturalTypeLabel ?lpsnUrl WHERE {
VALUES ?taxonRank {wd:Q7432 wd:Q68947} .
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
OPTIONAL {?item wdt:P427/wdt:P225 ?nomenclaturalType} .
OPTIONAL {?item wdt:P427/wdt:P105 ?rankOfnomenclaturalType} .
OPTIONAL {?item wdt:P1991 ?lpsnUrl} .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!bound(?nomenclaturalType)|| !sameTerm(?rankOfNomenclaturalType, wd:Q855769))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?taxonName)
Violation of Rule 20a (Type of a Genus)[edit]
SELECT DISTINCT ?item ?taxonName ?nomenclaturalType ?rankOfNomenclaturalTypeLabel ?lpsnUrl WHERE {
VALUES ?taxonRank {wd:Q34740 wd:Q3238261} .
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
OPTIONAL {?item wdt:P427/wdt:P225 ?nomenclaturalType} .
OPTIONAL {?item wdt:P427/wdt:P105 ?rankOfnomenclaturalType} .
OPTIONAL {?item wdt:P1991 ?lpsnUrl} .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!bound(?nomenclaturalType)|| !sameTerm(?rankOfNomenclaturalType, wd:Q7432))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?taxonName)
Violation of Rule 20g (Type of a Subgenus)[edit]
TODO
Violation of Rule 21a (Type of a Taxon from Genus to Order (Subtribe, Tribe, Subfamily, Family, Suborder, and Order))[edit]
SELECT DISTINCT ?item ?taxonName ?taxonRankLabel ?nomenclaturalType ?rankOfNomenclaturalTypeLabel ?lpsnUrl WHERE {
VALUES ?taxonRank {wd:Q3965313 wd:Q227936 wd:Q2455704 wd:Q35409 wd:Q5867959 wd:Q36602} .
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
OPTIONAL {?item wdt:P427/wdt:P225 ?nomenclaturalType} .
OPTIONAL {?item wdt:P427/wdt:P105 ?rankOfnomenclaturalType} .
OPTIONAL {?item wdt:P1991 ?lpsnUrl} .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!bound(?nomenclaturalType)|| !sameTerm(?rankOfNomenclaturalType, wd:Q34740))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?taxonRankLabel) ASC(?taxonName)
Violation of Rule 22 (Type of a Taxon Higher than Order)[edit]
SELECT DISTINCT ?item ?taxonName ?taxonRankLabel ?nomenclaturalType ?rankOfNomenclaturalTypeLabel ?lpsnUrl WHERE {
VALUES ?taxonRank {wd:Q5867051 wd:Q37517} .
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
OPTIONAL {?item wdt:P427/wdt:P225 ?nomenclaturalType} .
OPTIONAL {?item wdt:P427/wdt:P105 ?rankOfnomenclaturalType} .
OPTIONAL {?item wdt:P1991 ?lpsnUrl} .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q743780 .
FILTER(!bound(?nomenclaturalType)|| !sameTerm(?rankOfNomenclaturalType, wd:Q36602))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?taxonRankLabel) ASC(?taxonName)
International Code of Virus Classification and Nomenclature (Q14920640)[edit]
Taxa[edit]
SELECT DISTINCT ?item ?taxonName ?taxonRankLabel WHERE {
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q14920640.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?taxonName)
Ranks[edit]
SELECT DISTINCT ?taxonRankLabel (COUNT(?taxonRankLabel) AS ?countOfTaxonRank) WHERE {
?item wdt:P105 ?taxonRank .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q14920640.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
GROUP BY ?taxonRankLabel
ORDER BY DESC(?countOfTaxonRank)
Type species[edit]
SELECT DISTINCT ?item ?taxonName ?nomenclaturalType ?rankOfNomenclaturalTypeLabel WHERE {
VALUES ?taxonRank {wd:Q34740} .
?item wdt:P225 ?taxonName .
?item wdt:P105 ?taxonRank .
OPTIONAL {?item wdt:P427/wdt:P225 ?nomenclaturalType} .
OPTIONAL {?item wdt:P427/wdt:P105 ?rankOfnomenclaturalType} .
?item (wdt:P171)* ?higherParent .
?higherParent wdt:P944 wd:Q14920640 .
#FILTER(!bound(?nomenclaturalType)|| !sameTerm(?rankOfNomenclaturalType, wd:Q855769))
#FILTER(bound(?nomenclaturalType))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
ORDER BY ASC(?taxonName)
ICTV Master Species Lists[edit]
SELECT DISTINCT ?item ?title ?published WHERE {
?item wdt:P629 wd:Q45362532 . #ICTV Master Species List
?item wdt:P1476 ?title .
?item wdt:P577 ?published .
}
ORDER BY ASC(?published)
International Code of Nomenclature for Cultivated Plants (Q941761)[edit]
Maintenance[edit]
Format[edit]
SELECT ?item ?taxonName WHERE {
SERVICE gas:service {
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:in wd:Q756 . # Plantae
gas:program gas:out ?item .
gas:program gas:maxIterations 20 .
gas:program gas:maxVisited 2700000 .
gas:program gas:linkType wdt:P171 .
gas:program gas:traversalDirection "Reverse" .
}
?item wdt:P105 wd:Q7432 .
?item wdt:P225 ?taxonName .
FILTER (CONTAINS(?taxonName, "'"))
}
ORDER BY ASC(?taxonName)
SELECT ?item ?taxonName WHERE {
?item wdt:P105 wd:Q4886 . # Cultivar
?item wdt:P225 ?taxonName .
FILTER (CONTAINS(?taxonName, "'"))
}
ORDER BY ASC(?taxonName)
Rank or cultivarname[edit]
SELECT DISTINCT ?item ?taxonName ?taxonRankLabel WHERE {
{
?item wdt:P31 wd:Q4886 .
OPTIONAL {?item wdt:P225 ?taxonName}
}
UNION {
VALUES ?ranks {wd:Q4886 wd:Q4150646} . # cultivar, cultivar-group
?item wdt:P105 ?ranks.
?item wdt:P225 ?taxonName .
}
OPTIONAL {?item wdt:P105 ?taxonRank}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
#FILTER(!sameTerm(?taxonRank, wd:Q4886) && !sameTerm(?taxonRank, wd:Q4150646))
FILTER(!BOUND(?taxonName))
}
ORDER BY ASC(?taxonName)
Databases[edit]
International Plant Names Index (Q922063)[edit]
Statistic[edit]
SELECT ?countOfIpniPublicationId ?countOfIpniAuthorId ?countOfIpniTaxonId
WITH {
SELECT (COUNT(*) AS ?countOfIpniPublicationId) WHERE {
[] wdt:P2008 [].
}
} AS %countOfIpniPublicationId
WITH {
SELECT (COUNT(*) AS ?countOfIpniAuthorId) WHERE {
[] wdt:P586 [].
}
} AS %countOfIpniAuthorId
WITH {
SELECT (COUNT(*) AS ?countOfIpniTaxonId) WHERE {
[] wdt:P961 [].
}
} AS %countOfIpniTaxonId
WHERE {
INCLUDE %countOfIpniPublicationId.
INCLUDE %countOfIpniAuthorId.
INCLUDE %countOfIpniTaxonId.
}
World Register of Marine Species (Q604063)[edit]
Statistic[edit]
SELECT ?countOfWoRMSPublicationId ?countOfWoRMSTaxonId
WITH {
SELECT (COUNT(*) AS ?countOfWoRMSPublicationId) WHERE {
[] wdt:P6678 [].
}
} AS %countOfWoRMSPublicationId
WITH {
SELECT (COUNT(*) AS ?countOfWoRMSTaxonId) WHERE {
[] wdt:P850 [].
}
} AS %countOfWoRMSTaxonId
WHERE {
INCLUDE %countOfWoRMSPublicationId.
INCLUDE %countOfWoRMSTaxonId.
}
Tropicos (Q2578548)[edit]
Statistic[edit]
SELECT ?countOfTropicosPublicationId ?countOfTropicosTaxonId
WITH {
SELECT (COUNT(*) AS ?countOfTropicosPublicationId) WHERE {
[] wdt:P4904 [].
}
} AS %countOfTropicosPublicationId
WITH {
SELECT (COUNT(*) AS ?countOfTropicosTaxonId) WHERE {
[] wdt:P960 [].
}
} AS %countOfTropicosTaxonId
WHERE {
INCLUDE %countOfTropicosPublicationId.
INCLUDE %countOfTropicosTaxonId.
}
ZooBank (Q8074026)[edit]
Statistic[edit]
SELECT ?countOfZoobankPublicationId ?countOfZoobankAuthorId ?countOfZoobankActId
WITH {
SELECT (COUNT(*) AS ?countOfZoobankPublicationId) WHERE {
[] wdt:P2007 [].
}
} AS %countOfZoobankPublicationId
WITH {
SELECT (COUNT(*) AS ?countOfZoobankAuthorId) WHERE {
[] wdt:P2006 [].
}
} AS %countOfZoobankAuthorId
WITH {
SELECT (COUNT(*) AS ?countOfZoobankActId) WHERE {
[] wdt:P1746 [].
}
} AS %countOfZoobankActId
WHERE {
INCLUDE %countOfZoobankPublicationId.
INCLUDE %countOfZoobankAuthorId.
INCLUDE %countOfZoobankActId.
}
Misc[edit]
IUCN conservation status (P141)[edit]
Statistic[edit]
SELECT ?iucnStatusLabelDe (COUNT(?iucnStatusLabelDe) AS ?countOfIucnStatus) WHERE {
?item wdt:P141 ?iucnStatus .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de" .
?iucnStatus rdfs:label ?iucnStatusLabelDe .
}
}
GROUP BY ?iucnStatusLabelDe
ORDER BY ASC(?countOfIucnStatus)
Referenced by previous list[edit]
SELECT ?item ?taxonName ?iucnStatusLabelDe ?iucnStatusLabelEn ?iucnId WHERE {
?item wdt:P141 ?iucnStatus .
?item wdt:P225 ?taxonName .
?item p:P141 ?iucnStatus1 .
?iucnStatus1 ps:P141 ?iucnStatusValue .
?iucnStatus1 prov:wasDerivedFrom ?ref .
?ref pr:P248 wd:Q56011232. # previous list 2018/1
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de" .
?iucnStatus rdfs:label ?iucnStatusLabelDe .
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
?iucnStatus rdfs:label ?iucnStatusLabelEn .
}
}
ORDER BY ASC(?iucnStatusLabelDe)
Possibly wrong Id[edit]
SELECT ?item ?taxonName ?iucnId ?iucnIdInRef WHERE {
?item wdt:P627 ?iucnId .
?item wdt:P225 ?taxonName .
?item p:P141 ?iucnStatus .
?iucnStatus ps:P141 ?iucnStatusValue .
?iucnStatus prov:wasDerivedFrom ?ref .
OPTIONAL {?ref pr:P627 ?iucnIdInRef} .
FILTER (?iucnId != ?iucnIdInRef)
}
ORDER BY ASC(xsd:integer(?iucnId))
BirdLife taxon ID (P5257)[edit]
SELECT ?item ?taxonName ?birdLifeId ?iucnId WHERE {
?item wdt:P5257 ?birdLifeId .
?item wdt:P225 ?taxonName .
OPTIONAL {?item wdt:P627 ?iucnId }
FILTER (?birdLifeId != ?iucnId)
#FILTER (!BOUND(?iucnId))
}
Maintenance[edit]
External ID vs. reference URL (P854)[edit]
SELECT ?item ?id ?taxonName ?urlAsSource ?importedFromWikimediaProject ?statedIn WHERE {
?item wdt:P225 ?taxonName .
?item p:P685/ps:P685 ?id .
?item p:P685 ?idStatement .
?idStatement prov:wasDerivedFrom ?ref .
OPTIONAL {?ref pr:P854 ?urlAsSource} .
OPTIONAL {?ref pr:P143 ?importedFromWikimediaProject} .
OPTIONAL {?ref pr:P248 ?statedIn} .
BIND(str(?urlAsSource) as ?urlAsSourceString)
FILTER(!bound(?statedIn))
FILTER(strStarts(?urlAsSourceString, "https://www.ncbi.nlm.nih.gov/"))
#FILTER(bound(?statedIn) && !sameTerm(?statedIn, wd:Q13711410))
}
ORDER BY ASC(xsd:integer(?id)) ASC(?taxonName)