query-0088f14ac487423995d5e84ef682813c

rq turtle/ttl

museum ship location

Use at

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 ?ship ?shipLabel ?shipDescription ?coordinates WHERE {
  ?ship wdt:P625 ?coordinates.
  {
    ?ship p:P31 ?statement0.
    ?statement0 (ps:P31/(wdt:P279*)) wd:Q575727.
  }
  UNION
  {
    ?ship p:P366 ?statement1.
    ?statement1 (ps:P366/(wdt:P279*)) wd:Q575727.
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en.mul". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?coordinates"):::projected v1("?ship"):::projected v3("?statement0") v4("?statement1") a1((" ")) a2((" ")) c9(["bd:serviceParam"]):::iri c5(["wd:Q575727"]):::iri c11(["en-gb,en.mul"]):::literal v1 --"p:direct/P625"--> v2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"p:P366"--> v4 v4 --"p:statement/P366"--> a2 a2 --"p:direct/P279"--> c5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P31"--> v3 v3 --"p:statement/P31"--> a1 a1 --"p:direct/P279"--> c5 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end