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