text: CREATE OR REPLACE FUNCTION CantPersonasCanton
  RETURN  NUMBER
  IS
  CANTPERSONAS NUMBER;
  BEGIN
  SELECT COUNT(*) into cantpersonas
  FROM PERSONA P INNER JOIN
  DISTRITO D ON P.iddistrito = d.id
  INNER JOIN CANTON C ON d.idcanton= c.id;
  END;