query-89157530d11d39abdf6dc9e6c7e765a6
TODO
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?itemAltLabel ?itemDescription ?vessel_classLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en,mul". }
{
SELECT DISTINCT ?item WHERE {
?item p:P137 ?statement0.
?statement0 (ps:P137/(wdt:P279*)) wd:Q172771.
?item p:P8047 ?statement1.
?statement1 (ps:P8047/(wdt:P279*)) _:anyValueP8047.
}
}
OPTIONAL { ?item wdt:P289 ?vessel_class. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?statement0")
v3("?statement1")
v4("?vessel_class")
a3((" "))
a1((" "))
a2((" "))
c4(["en-gb,en,mul"]):::literal
c2(["bd:serviceParam"]):::iri
c8(["wd:Q172771"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:P137"--> v2
v2 --"p:statement/P137"--> a1
a1 --"p:direct/P279"--> c8
v1 --"p:P8047"--> v3
v3 --"p:statement/P8047"--> a2
a2 --"p:direct/P279"--> a3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P289".-> v4
end