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