What is the {kinship} with the {MAX(family relationship degree)} whose {has quality} is {female}  ?
Who is the closest female relative?
Who is the closest female relative?
SELECT ?a WHERE { ?a property:has_quality resource:female . ?a property:family_relationship_degree ?o . ?a rdf:type ontology:kinship }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q171318>.

?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?ent .
?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P4500>.
?statement1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj1.

?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?ent .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P1552> .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q6581072> .

}
ORDER BY DESC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q171318 . ?ent wdt:P4500 ?obj . ?ent wdt:P1552 wd:Q6581072 } ORDER BY DESC(?obj)LIMIT 5 
great-grandmother father's father's mother father's mother's mother mother's father's mother mother's mother's father