query-1e24be913331d85d767d5b9aec84454e

rq turtle/ttl

Propertiesmaintained by WikiProject (P6104)taxon rank (P105)taxon name (P225)main subject (P921)title (P1476)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT 
DISTINCT
?item ?title
(REPLACE(STR(?item), ".*Q", "Q") AS ?qid) 
("P6104" AS ?property)
("Q56241615" AS ?WikiProjectQID)
WHERE {
   {
  SELECT DISTINCT ?item ?title {
     {
  SELECT DISTINCT ?taxon {
    SERVICE bd:sample { ?taxon wdt:P6104 wd:Q56241615 . bd:serviceParam bd:sample.limit 2000 }
    ?taxon wdt:P105 wd:Q7432 .
  }
}    ?taxon wdt:P225 ?taxonname .
    ?item wdt:P921 ?taxon ;
          wdt:P1476 ?title .
    MINUS {?item wdt:P6104 wd:Q56241615 }
    FILTER REGEX(LCASE(?title), LCASE(?taxonname)).
  }
}  FILTER REGEX(LCASE(?title), "\\b(invasive|non-native|invasion|exotic\\b|introduced)").
  FILTER (!REGEX(LCASE(?title), "\\b(disease|cancer|patho|escherichia|coli|medic|clinic|epidem|infectio|virus|protein|cell|non-invasive)")).
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?WikiProjectQID") v4("?item"):::projected v6("?property") v5("?qid") v3("?taxon") v2("?taxonname") v1("?title"):::projected c5(["wd:Q56241615"]):::iri c8(["2000^^xsd:integer"]):::literal c6(["bd:serviceParam"]):::iri c10(["wd:Q7432"]):::iri f0[["not regex(lower-case(?title),'\b(disease|cancer|patho|escherichia|coli|medic|clinic|epidem|infectio|virus|protein|cell|non-invasive)')"]] f0 --> v1 f1[["regex(lower-case(?title),'\b(invasive|non-native|invasion|exotic\b|introduced)')"]] f1 --> v1 f2[["regex(lower-case(?title),lower-case(?taxonname))"]] f2 --> v1 f2 --> v2 subgraph s1["http://www.bigdata.com/rdf#sample"] style s1 stroke-width:4px; v3 --"wdt:P6104"--> c5 c6 --"bd:sample.limit"--> c8 end v3 --"wdt:P105"--> c10 v3 --"wdt:P225"--> v2 v4 --"wdt:P921"--> v3 v4 --"wdt:P1476"--> v1 subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v4 --"wdt:P6104"--> c5 end bind4[/"replace(str(?item),'.*Q','Q')"/] v4 --o bind4 bind4 --as--o v5 bind5[/"'P6104'"/] bind5 --as--o v6 bind6[/"'Q56241615'"/] bind6 --as--o v7