Hay un error: ERROR: column "un" does not exist LINE 25: ...fechapublicacion >= '2019-06-19 11:53:55' ) AND n.idnota =un ^