Hay un error: ERROR: column "entregan" does not exist LINE 25: ...ublicacion >= '2019-05-26 05:30:16' ) AND n.idnota =entregan ^