-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathST_UNIONAGGR.SQL
More file actions
21 lines (16 loc) · 809 Bytes
/
ST_UNIONAGGR.SQL
File metadata and controls
21 lines (16 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CREATE SCHEMA DEVTEST;
CREATE COLUMN TABLE "DEVTEST"."GEOTEST" (
"ROW_ID" INTEGER CS_INT,
"MY_GEO" ST_GEOMETRY,
PRIMARY KEY ("ROW_ID")
);
insert into "DEVTEST"."GEOTEST" values(1, NEW ST_POINT('POINT(1 6)'));
insert into "DEVTEST"."GEOTEST" values(2, NEW ST_POINT('POINT(6 4)'));
insert into "DEVTEST"."GEOTEST" values(3, NEW ST_POINT('POINT(1 12)'));
insert into "DEVTEST"."GEOTEST" values(4, NEW ST_POINT('POINT(4 6)'));
insert into "DEVTEST"."GEOTEST" values(5, NEW ST_POINT('POINT(10 10)'));
insert into "DEVTEST"."GEOTEST" values(6, NEW ST_POINT('POINT(2 4)'));
SELECT ST_UNIONAGGR("MY_GEO").ST_AsWKT()
FROM "DEVTEST"."GEOTEST";
insert into "DEVTEST"."GEOTEST" values(7, NEW ST_POINT('POINT(1 6)'));
insert into "DEVTEST"."GEOTEST" values(8, NEW ST_POLYGON('POLYGON((0 0, 0 6, 6 6, 0 0))'));