PostgreSQL 9.3: Display result in specific format using array_agg function
问题 I want to show the given records in the following table into the specific format which is shown below in the table. Creating table: Test_1 CREATE TABLE Test_1 ( ColumnA varchar, ColumnB varchar ); Insertion of records: INSERT INTO Test_1 values('A101','B101'),('A102','B102'), ('A103','B103'),('A104','B104'), ('A105','B105'),('A106','B106'), ('A107','B107'),('A108','B108'), ('A109','B109'),('A201','B201'); I want to show the result like this: Expected Result : ColumnA ColumnX -----------------