   RETURN QUERY EXECUTE format(
     $query$
     SELECT ST_AsMVT(q, 'data', $2) FROM (
-      SELECT ST_AsMVTGeom(the_geom, $1, $2, $3, $4) AS mvtgeom, %13$s as id, %11$s, %12$s FROM (
+      SELECT ST_AsMVTGeom(the_geom, $1, $2, $3, $4) AS mvtgeom, %13$s as id, %11$s, %12$s, area_ratio FROM (
         SELECT  %1$s the_geom,  %13$s, %2$s, %3$s,
                 CASE  WHEN ST_Within($5, %1$s)
                         THEN ST_Area($5) / Nullif(ST_Area(%1$s), 0)

geography_level TEXT,
do_measurements TEXT[],
mastercard_measurements TEXT[],
mastercard_category TEXT DEFAULT 'Total Retail',
extent INTEGER DEFAULT 4096, buf INTEGER DEFAULT 256, clip_geom BOOLEAN DEFAULT True)
RETURNS TABLE (mvt BYTEA)

   WHERE schemaname = mastercard_schema
     AND tablename LIKE '%'||(string_to_array(geography_level, '.'))[array_length(string_to_array(geography_level, '.'), 1)]||'%';

  SELECT string_agg(column_name, ','), string_agg(distinct column_name||area_normalization||' '||column_name, ',')
    INTO numer_colnames_mc, numer_colnames_mc_normalized
    FROM information_schema.columns
   WHERE table_schema = mastercard_schema
