ARRAY_TO_JSON Using ARRAY_AGGの例の設定 - Teradata Database - Teradata Vantage NewSQL Engine - ARRAY_AGG と ARRAY_TO_JSONの例で使用するデータを含むテーブルを設定します。

Teradata Vantage™ JSONデータ型

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
2019年3月
Language
日本語
Last Update
2019-10-29
dita:mapPath
ja-JP/bgi1512081870828.ditamap
dita:ditavalPath
ja-JP/bgi1512081870828.ditaval
dita:id
evi1472243742653
Product Category
Software
Teradata Vantage

後の例で使用するテーブルを作成して、データを取り込みます。

CREATE TABLE employeeTable(empId INTEGER, 
     age INTEGER, 
     pos CHAR(10), 
     salary INTEGER);
INSERT INTO employeeTable(1, 24, 'engineer', 50000);
INSERT INTO employeeTable(2, 34, 'engineer', 100000);
INSERT INTO employeeTable(3, 25, 'engineer', 50000);
INSERT INTO employeeTable(4, 21, 'engineer', 75000);
INSERT INTO employeeTable(5, 31, 'salesman', 50000);
INSERT INTO employeeTable(6, 32, 'salesman', 100000);
INSERT INTO employeeTable(7, 33, 'salesman', 50000);
INSERT INTO employeeTable(8, 40, 'salesman', 75000);
INSERT INTO employeeTable(9, 40, 'manager', 75000);
INSERT INTO employeeTable(10, 41, 'manager', 50000);
INSERT INTO employeeTable(11, 45, 'manager', 125000);
INSERT INTO employeeTable(12, 48, 'manager', 100000);
INSERT INTO employeeTable(13, 50, 'executive', 125000);
INSERT INTO employeeTable(14, 51, 'executive', 150000);
INSERT INTO employeeTable(15, 52, 'executive', 150000);
INSERT INTO employeeTable(16, 52, 'executive', 200000);
INSERT INTO employeeTable(17, 60, 'executive', 1000000);