I have an RDFS ontology where i have one class Person and another class Department The class Person has a property called has_name and a property called member_of with domain Person and range Department. The class Department has a property called dep_city and another called dep_name,both have domain Department and range literal.
I want to create a query so that returns the has_name value of every Person that is member_of a Department that has dep_city = "New York".
My question is how to connect the two classes that i need to create my query.
I can return the dep_name of all the Departments that have dep_city = "New York"
I also know how return all the has_name of all the Persons but i don't if i can connect the two.
Please help me Thank you!!