query-2e7db69648c8a31b9a444c4f95e3c461
naval vessel official/name with a (
Use at
- https://query.wikidata.org/sparql
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#>
SELECT ?item ?name WHERE
{
?item wdt:P31/wdt:P279* wd:Q177597;
rdfs:label ?label. FILTER(LANG(?label) = "en").
OPTIONAL {?item wdt:P1448 ?official. FILTER(LANG(?official) = "mul")}
BIND (COALESCE(?official,?label) AS ?name)
FILTER(CONTAINS(?name, "(")).
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?item"):::projected
v2("?label")
v5("?name"):::projected
v3("?official")
a1((" "))
c6(["wd:Q177597"]):::iri
f0[["contains(?name,'(')"]]
f0 --> v5
f1[["?label = 'en'"]]
f1 --> v2
v4 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c6
v4 --"rdfs:label"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P1448".-> v3
end
bind2[/"?official?label"/]
v3 --o bind2
v2 --o bind2
bind2 --as--o v5