I'm trying to get a list of all of the landmark buildings in NYC / Manhattan. The problem I'm getting is when the building has multiple owners - my query only returns the name of one of the owners, and I need them all. Example is the Chrysler Building - I'm only seeing "Signa Holding" when I should get "Signa Holding", "Tishman Speyer", and "Abu Dhabi Investment Council".
Another question - I'm trying to get the building's architectural height (wdt:P2048/wd:Q24192182) - how do I add that as an optional parameter?
My query:
SELECT DISTINCT ?skyscraperLabel ?skyscraperDescription ?inception ?link ?coord ?lat ?lon ?postalCode ?ownedBy ?ownedByLabel ?floorsAboveGround ?floorsBelowGround ?geonamesID
WHERE
{
?skyscraper wdt:P1435* wd:Q19825927. # NYC Landmark
?skyscraper wdt:P131* wd:Q11299. # Located in Manhattan
OPTIONAL {?skyscraper wdt:P571 ?inception}
OPTIONAL {?skyscraper wdt:P856 ?link.} # official website
OPTIONAL {?skyscraper wdt:P625 ?coord .} # geographic coord
OPTIONAL {
?skyscraper p:P625 ?statement.
?statement psv:P625 ?node.
?node wikibase:geoLatitude ?lat.
?node wikibase:geoLongitude ?lon.
}
OPTIONAL {?skyscraper wdt:P281 ?postalCode.} # Postal Code
OPTIONAL {
?skyscraper wdt:P127 ?ownedBy.
?ownedBy rdfs:label ?ownedByLabel filter (lang(?ownedByLabel) = "en").
} # Owner
OPTIONAL {?skyscraper wdt:P1101 ?floorsAboveGround.} # Floors above ground
OPTIONAL {?skyscraper wdt:P1139 ?floorsBelowGround.} # Floors below ground
OPTIONAL {?skyscraper wdt:P1566 ?geonamesID.} # GeoNamesID
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}