   geom_geomref_colnames_qualified TEXT;
   geom_relations_do TEXT;
   geom_relations_mc TEXT;
+
+  area_normalization TEXT DEFAULT '';
 BEGIN
+  IF area_normalized THEN
+    area_normalization := '/area_ratio';
+  END IF;
+
   bounds := cdb_observatory.OBS_GetTileBounds(z, x, y);
   geom := ST_MakeEnvelope(bounds[1], bounds[2], bounds[3], bounds[4], 4326);
   ext := ST_MakeBox2D(ST_Point(bounds[1], bounds[2]), ST_Point(bounds[3], bounds[4]));

   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_ratio '||column_name, ',')
    INTO numer_colnames_mc, numer_colnames_mc_normalized
    FROM information_schema.columns
   WHERE table_schema = mastercard_schema


  SELECT  string_agg(distinct 'observatory.'||numer_tablename, ',') numer_tablenames,
          string_agg(distinct numer_tablename||'.'||numer_colname, ',') numer_colnames,
          string_agg(distinct numer_colname||area_normalization||' '||numer_colname, ',') numer_colnames_normalized,
          (array_agg(distinct 'observatory.'||geom_tablename))[1] geom_tablenames,
          (array_agg(distinct geom_colname))[1] geom_colnames,
          (array_agg(distinct geom_geomref_colname))[1] geom_geomref_colnames,
