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