What is the {church} with the {MIN(maximum capacity)} whose {diocese} is {Diocese of Lapua}  ?
Which church has the smallest space in the Diocese of Lapua?
In the Diocese of Lapua, which church is the smallest in capacity?
SELECT ?c WHERE { ?c property:diocese resource:Diocese_of_Lapua . ?c rdf:type ontology:church_building . ?c property:maximum_capacity ?w }
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q16970>.

?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/P1083>.
?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/P708> .
?statement2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q871032> .

}
ORDER BY ASC(?obj1)
LIMIT 5
select ?ent where { ?ent wdt:P31 wd:Q16970 . ?ent wdt:P1083 ?obj . ?ent wdt:P708 wd:Q871032} ORDER BY ASC(?obj)LIMIT 5 
Kauhajärvi Church Hietama Church Kauhajärvi Church Haapamäki Church Kannonkoski Church