def get_occurrences(self, ticket, order_by='-time', limit=50, offset=0):
        return [Occurrence(self, row) for row in
                self.engine.execute(self._order(
                    self.occurrences.select()
                    .where(self.occurrences.c.ticket_id == ticket),
                    self.occurrences, order_by)
                .limit(limit).offset(offset)).fetchall()]
Selects occurrences from the database for a ticket.
dataset/ETHPy150Open getlogbook/logbook/logbook/ticketing.py/SQLAlchemyBackend.get_occurrences