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