query-90202b04fedfa35d287f4d27ffa5088a
distinct port or harbour type items SELECT ?item ?itemLabel (group_concat(distinct ?instanceLabel;separator="; ") as ?type) ?LOCODE WHERE { VALUES ?instance { wd:Q1313726 # iceport wd:Q2093976 # industry harbour wd:Q6034850 # inland harbor wd:Q863915 # inland port wd:Q11422437 # International strategic port wd:Q2327160 # kwelkade wd:Q15709854 # liquefied natural gas terminal wd:Q721207 # marina wd:Q426875 # Mulberry harbour wd:Q64210934 # natural harbor wd:Q21601954 # naval air auxiliary station wd:Q6981985 # naval air station wd:Q1745026 # naval arsenal wd:Q1324633 # naval base wd:Q7619063 # naval shore establishment wd:Q55624858 # naval station wd:Q2185059 # Outport wd:Q2518617 # overnight stay harbour wd:Q4303352 # passenger ship terminal wd:Q2150794 # penalty port wd:Q16948701 # pilot station wd:Q44782 # port wd:Q2264924 # port city wd:Q2183215 # port of refuge wd:Q3398594 # Port of trade wd:Q11644820 # Priority ports wd:Q11326124 # Q11326124 wd:Q11366207 # Q11366207 wd:Q11422440 # Q11422440 wd:Q11553812 # Q11553812 wd:Q11644859 # Q11644859 wd:Q1449240 # Q1449240 wd:Q1476279 # Q1476279 wd:Q17172716 # Q17172716 wd:Q1879141 # Q1879141 wd:Q21028415 # Q21028415 wd:Q2837192 # Q2837192 wd:Q3114748 # Q3114748 wd:Q60035547 # Q60035547 wd:Q3543043 # quay wd:Q1310315 # rafting ground wd:Q3398676 # regasification terminal wd:Q913035 # roadstead wd:Q7398566 # safeguarded wharf wd:Q15310171 # seaport wd:Q11570893 # Specific port wd:Q331367 # submarine base wd:Q452020 # submarine pen wd:Q13403663 # warm-water port wd:Q3497366 # whaling station wd:Q828909 # wharf } ?item wdt:P31 ?instance. OPTIONAL {?item wdt:P1937 ?LOCODE .} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?instance rdfs:label ?instanceLabel . ?item rdfs:label ?itemLabel .} } group by ?item ?itemLabel ?LOCODE
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#>
# distinct port or harbour type items
SELECT ?item ?itemLabel (group_concat(distinct ?instanceLabel;separator="; ") as ?type) ?LOCODE
WHERE
{
VALUES ?instance {
wd:Q1313726 # iceport
wd:Q2093976 # industry harbour
wd:Q6034850 # inland harbor
wd:Q863915 # inland port
wd:Q11422437 # International strategic port
wd:Q2327160 # kwelkade
wd:Q15709854 # liquefied natural gas terminal
wd:Q721207 # marina
wd:Q426875 # Mulberry harbour
wd:Q64210934 # natural harbor
wd:Q21601954 # naval air auxiliary station
wd:Q6981985 # naval air station
wd:Q1745026 # naval arsenal
wd:Q1324633 # naval base
wd:Q7619063 # naval shore establishment
wd:Q55624858 # naval station
wd:Q2185059 # Outport
wd:Q2518617 # overnight stay harbour
wd:Q4303352 # passenger ship terminal
wd:Q2150794 # penalty port
wd:Q16948701 # pilot station
wd:Q44782 # port
wd:Q2264924 # port city
wd:Q2183215 # port of refuge
wd:Q3398594 # Port of trade
wd:Q11644820 # Priority ports
wd:Q11326124 # Q11326124
wd:Q11366207 # Q11366207
wd:Q11422440 # Q11422440
wd:Q11553812 # Q11553812
wd:Q11644859 # Q11644859
wd:Q1449240 # Q1449240
wd:Q1476279 # Q1476279
wd:Q17172716 # Q17172716
wd:Q1879141 # Q1879141
wd:Q21028415 # Q21028415
wd:Q2837192 # Q2837192
wd:Q3114748 # Q3114748
wd:Q60035547 # Q60035547
wd:Q3543043 # quay
wd:Q1310315 # rafting ground
wd:Q3398676 # regasification terminal
wd:Q913035 # roadstead
wd:Q7398566 # safeguarded wharf
wd:Q15310171 # seaport
wd:Q11570893 # Specific port
wd:Q331367 # submarine base
wd:Q452020 # submarine pen
wd:Q13403663 # warm-water port
wd:Q3497366 # whaling station
wd:Q828909 # wharf
}
?item wdt:P31 ?instance.
OPTIONAL {?item wdt:P1937 ?LOCODE .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?instance rdfs:label ?instanceLabel .
?item rdfs:label ?itemLabel .}
} group by ?item ?itemLabel ?LOCODE