'How do I figure out in which state is NYC?

I would like to properly query dbpedia and figure out the US State of New York City. I wrote the below query that returns the information among other things, but I am unsure how to change my query so it returns only the New York State.

SELECT *
WHERE
{
 values ?city { <http://dbpedia.org/resource/New_York_City> }
 
        ?city dbo:subdivision ?subdivision
 
}

result



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source