Hola, quisiera sabe si hay algún problema con el soporte para el value
PRECEDING\FOLLOWING al establecer un frame en consultas windows. La
siguiente consulta funciona bien
select destino, sum(saldo) over (partition by destino order by
fechaviaje rows between unbounded PRECEDING and unbounded following )
from viaje
pero si la modifico con un valor da error de sintaxis.
select destino, sum(saldo) over (partition by destino order by
fechaviaje rows between 1 PRECEDING and 1 following ) from viaje
Saludos
Julio
PD: estoy usando PostgreSQL 8.4 y la tabla en la que corro la consulta
es la siguiente.
CREATE TABLE viaje
(
idviaje integer NOT NULL,
destino character varying(100) NOT NULL,
fechaviaje date NOT NULL,
saldo integer NOT NULL,
CONSTRAINT "PK31" PRIMARY KEY (idviaje)
)