Modifying previous_by_users_other_than method to work with postgres