def METHOD_NAME(cls, username, work_id, event_type):
    oldb = db.get_db()
    data = {
        'username': username,
        'work_id': work_id,
        'event_type': event_type,
    }
    query = (
        f'SELECT id, event_date FROM {cls.TABLENAME}'
        ' WHERE username=$username AND work_id=$work_id'
        ' AND event_type=$event_type'
        ' ORDER BY event_date DESC LIMIT 1'
    )
    results = list(oldb.query(query, vars=data))
    return results[0] if results else None