Hay un error: ERROR: column "injusto" does not exist LINE 25: WHERE n.idnota =injusto ^