union all

create table p08 as select aac, ST_Union(the_geom) from "08" group by aac order by aac;
create table p09 as select aac, ST_Union(the_geom) from "09" group by aac order by aac;
create table p10 as select aac, ST_Union(the_geom) from "10" group by aac order by aac;
create table p11 as select aac, ST_Union(the_geom) from "11" group by aac order by aac;
create table p12 as select aac, ST_Union(the_geom) from "12" group by aac order by aac;
create table p14 as select aac, ST_Union(the_geom) from "14" group by aac order by aac;

create table kantowi as select * from p08 union all select * from p09 union all select * from p10 union all select * from p11 union all select * from p12 union all select * from p13wi union all select * from p14;

千葉県に1つ所属未定地があるので,それを除く.

create table p122 as select * from p12 offset 0 limit 61;
create table kantowi2 as select * from p08 union all select * from p09 union all select * from p10 union all select * from p11 union all select * from p122 union all select * from p13wi union all select * from p14;
create table codekantowi2 as select aac from kantowi2;

群馬県に埼玉県の飛び地(11218)があるので,それは除く.
除いても結局隣接はしているから,隣接情報を作る上では問題ない.

create table p102 as select * from p10 offset 0 limit 38;
create table kantowi3 as select * from p08 union all select * from p09 union all select * from p102 union all select * from p11 union all select * from p122 union all select * from p13wi union all select * from p14;
create table codekantowi3 as select aac from kantowi3;

神奈川県川崎市多摩区に,東京都稲城市(13225)があるので,同じようにする

create table p142 as select * from p14 offset 1;
create table kantowi4 as select * from p08 union all select * from p09 union all select * from p102 union all select * from p11 union all select * from p122 union all select * from p13wi union all select * from p142;
create table codekantowi4 as select aac from kantowi4;