query-ac9a49401872b012d481ecfd61956b83
Bug in usage of REGEXHello people, I have this query
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?trademark ?trademarkLabel ?image ?organization WHERE {
# find an instance of trademark or any of its subclasses
?trademark wdt:P31/wdt:P279* wd:Q167270.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,[AUTO_LANGUAGE]". }
#FILTER regex(?trademarkLabel, "Mercedes", "i").
#FILTER(CONTAINS(LCASE(?trademarkLabel), "mercedes"@en)).
# that is owned by an instance of organization
?trademark wdt:P127 ?organization.
?organization wdt:P31/wdt:P279* wd:Q43229.
# and has a logo image
?trademark wdt:P154 ?image.
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?image"):::projected
v2("?organization"):::projected
v1("?trademark"):::projected
a1((" "))
a2((" "))
c5(["bd:serviceParam"]):::iri
c3(["wd:Q167270"]):::iri
c7(["en,#91;AUTO_LANGUAGE#93;"]):::literal
c9(["wd:Q43229"]):::iri
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
v1 --"wdt:P127"--> v2
v2 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c9
v1 --"wdt:P154"--> v3