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