query-098f193982fdfc96dbad4a5200c430b6
Warships with more than one operator that do not map them to official name
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?operator1 ?operator2 ?operator1Label ?operator2Label ?itemLabel ?itemAltLabel WHERE {
?item wdt:P31/wdt:P279* wd:Q3114762 .
?item wdt:P137 ?operator1.
?item wdt:P137 ?operator2.
filter (str(?operator1) != str(?operator2) )
filter not exists {?item p:P1448/pq:P137 ?operator1 . }
?item wdt:P137 wd:Q172771.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en,mul". }
} order by ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?itemLabel"):::projected
v3("?operator1"):::projected
v4("?operator2"):::projected
a2((" "))
a1((" "))
c11(["en-gb,en,mul"]):::literal
c9(["bd:serviceParam"]):::iri
c5(["wd:Q3114762"]):::iri
c7(["wd:Q172771"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:P1448"--> e0a1
e0a1 --"p:qualifier/P137"--> e0v2
e0v1("?item"):::projected
e0v2("?operator1"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> a1
f0 --> c2
f0 --> v3
v2 --"p:P1448"--> a1
a1 --"p:qualifier/P137"--> v3
f1[["str(?operator1) != str(?operator2)"]]
f1 --> v3
f1 --> v4
v2 --"p:direct/P31"--> a2
a2 --"p:direct/P279"--> c5
v2 --"p:direct/P137"--> v3
v2 --"p:direct/P137"--> v4
v2 --"p:direct/P137"--> c7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end