writing ORM queries to return the results of the poll