query-83edc652749b7054a110588af8afbb16
Ports in Saudi Arabia
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?label ?_coords ?_unlocode ?_wpi ?_mt ?_operator ?_water WHERE {
?item wdt:P31 wd:Q44782.
?item wdt:P17 wd:Q851
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
?item rdfs:label ?label .
?_operatorId rdfs:label ?_operator .
?_waterId rdfs:label ?_water .
}
OPTIONAL { ?item wdt:P625 ?_coords. }
OPTIONAL { ?item wdt:P1937 ?_unlocode. }
OPTIONAL { ?item wdt:P7625 ?_wpi. }
OPTIONAL { ?item wdt:P1624 ?_mt. }
OPTIONAL { ?item wdt:P137 ?_operatorId. }
OPTIONAL { ?item wdt:P206 ?_waterId. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?_coords"):::projected
v10("?_mt"):::projected
v4("?_operator"):::projected
v3("?_operatorId")
v8("?_unlocode"):::projected
v6("?_water"):::projected
v5("?_waterId")
v9("?_wpi"):::projected
v1("?item"):::projected
v2("?label"):::projected
c2(["wd:Q44782"]):::iri
c8(["en"]):::literal
c4(["wd:Q851"]):::iri
c6(["bd:serviceParam"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P17"--> c4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
v1 --"rdfs:label"--> v2
v3 --"rdfs:label"--> v4
v5 --"rdfs:label"--> v6
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1937".-> v8
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P7625".-> v9
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1624".-> v10
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P137".-> v3
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P206".-> v5
end