Switch revision query to outer join