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