What is the {referendums in Ireland} with the {MAX(votes received)} whose {follows} is {Thirty-First Amendment of the Constitution of Ireland}  ?
Which referendum following the Thirty-First Amendment of the Constitution of Ireland received the most votes ?
select ?ent where { ?ent wdt:P31 wd:Q54086790 . ?ent wdt:P1111 ?obj . ?ent wdt:P155 wd:Q4310000 } ORDER BY DESC(?obj)LIMIT 5 
select ?ent where {
?ent <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q54086790>.

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

}
ORDER BY DESC(?obj1)
LIMIT 5
Which referendum following the Thirty-First Amendment of the Constitution of Ireland was given the most votes ?