El error es: Esto lo resolverá: SELECT cr.plate, car_id_seq.nextval FROM (SELECT DISTINCT plate FROM cars_rentals) cr