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