query-06efccfffed7f54761bb550637ad9db3

rq turtle/ttl

Propertiesmain subject (P921)instance of (P31)taxon name (P225)stated in (P248)reference has role (P6184)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
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 ?itemLabel WHERE {
  ?item wdt:P921 wd:Q27652812.
  ?item wdt:P31 wd:Q13442814.
  FILTER NOT EXISTS { ?item wdt:P31 wd:Q1348305 }
  FILTER NOT EXISTS { ?taxon p:P225 [ prov:wasDerivedFrom [ pr:P248 ?item; pr:P6184 ?role ] ] }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". 
    ?item rdfs:label ?itemLabel. 
  }
  FILTER (CONTAINS (LCASE(STR(?itemLabel)), "n. sp."))
} LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?itemLabel"):::projected v3("?role") v4("?taxon") a2((" ")) a1((" ")) c9(["wd:Q27652812"]):::iri c7(["wd:Q1348305"]):::iri c14(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal c10(["wd:Q13442814"]):::iri c12(["bd:serviceParam"]):::iri f0[["contains(lower-case(str(?itemLabel)),'n. sp.')"]] f0 --> v1 f1[["not "]] subgraph f1e0["Exists Clause"] e0a1 --"p:reference/P248"--> e0v1 e0a1 --"p:reference/P6184"--> e0v2 e0a2 --"prov:wasDerivedFrom"--> e0a1 e0v3 --"p:P225"--> e0a2 e0v1("?item"):::projected e0v2("?role"):::projected e0v3("?taxon"):::projected e0a2((" ")):::projected e0a1((" ")):::projected end f1--EXISTS--> f1e0 f1 --> a1 f1 --> c2 f1 --> v2 f1 --> c3 f1 --> v3 f1 --> a2 f1 --> c4 f1 --> v4 f1 --> c5 a1 --"p:reference/P248"--> v2 a1 --"p:reference/P6184"--> v3 a2 --"prov:wasDerivedFrom"--> a1 v4 --"p:P225"--> a2 f2[["not "]] subgraph f2e1["Exists Clause"] e1v1 --"p:direct/P31"--> e1c2 e1v1("?item"):::projected e1c2(["wd:Q1348305"]):::iri end f2--EXISTS--> f2e1 f2 --> v2 f2 --> c6 f2 --> c7 v2 --"p:direct/P31"--> c7 v2 --"p:direct/P921"--> c9 v2 --"p:direct/P31"--> c10 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 v2 --"rdfs:label"--> v1 end