query-fe4eb71483ecc15fd7721ab480ee05fb
Propertiesmaintained by WikiProject (P6104)taxon rank (P105)taxon name (P225)main subject (P921)title (P1476)
Use at
- https://query.wikidata.org/sparql
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 20000 }
?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), "(idae|ceae)\\b").
FILTER (!REGEX(LCASE(?title), "(\\b(minimally|disease|cancer|patho|escherichia|coli|medic|clinic|epidem|infectio|virus|protein|cell|non-invasive|mutant)|cell)")).
}
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
c6(["wd:Q56241615"]):::iri
c9(["20000^^xsd:integer"]):::literal
c7(["bd:serviceParam"]):::iri
c11(["wd:Q7432"]):::iri
f0[["not regex(lower-case(?title),'(\b(minimally|disease|cancer|patho|escherichia|coli|medic|clinic|epidem|infectio|virus|protein|cell|non-invasive|mutant)|cell)')"]]
f0 --> v1
f1[["regex(lower-case(?title),'(idae|ceae)\b')"]]
f1 --> v1
f2[["regex(lower-case(?title),'\b(invasive|non(.?)native|invasion|exotic\b|introduced)')"]]
f2 --> v1
f3[["regex(lower-case(?title),lower-case(?taxonname))"]]
f3 --> v1
f3 --> v2
subgraph s1["http://www.bigdata.com/rdf#sample"]
style s1 stroke-width:4px;
v3 --"wdt:P6104"--> c6
c7 --"bd:sample.limit"--> c9
end
v3 --"wdt:P105"--> c11
v3 --"wdt:P225"--> v2
v4 --"wdt:P921"--> v3
v4 --"wdt:P1476"--> v1
subgraph minus4["MINUS"]
style minus4 stroke-width:6px,fill:pink,stroke:red;
v4 --"wdt:P6104"--> c6
end
bind5[/"replace(str(?item),'.*Q','Q')"/]
v4 --o bind5
bind5 --as--o v5
bind6[/"'P6104'"/]
bind6 --as--o v6
bind7[/"'Q56241615'"/]
bind7 --as--o v7