 -- Moran's I Global Measure (public-facing)
 CREATE OR REPLACE FUNCTION
-  CDB_AreasOfInterestGlobal (
+  CDB_AreasOfInterestGlobal(
       subquery TEXT,
       attr_name TEXT,
       permutations INT DEFAULT 99,

AS $$

  SELECT moran, quads, significance, ids, y
  FROM cdb_crankshaft._CDB_AreasOfInterest_Local(subquery, attr, permutations, geom_col, id_col, w_type, num_ngbrs)
  WHERE quads IN ('HL', 'LH');

$$ LANGUAGE SQL;

AS $$

  SELECT moran, quads, significance, ids, y
  FROM cdb_crankshaft._CDB_AreasOfInterestLocalRate(subquery, numerator, denominator, permutations, geom_col, id_col, w_type, num_ngbrs);

$$ LANGUAGE SQL;

