Oracle LISTAGG() for multiple attributes?
问题 I wonder if there is a better (i.e. faster execution) solution to the problem described below. Step 1) create table t (k number, v1 number, v2 number); insert into t values (1,1,1); insert into t values (1,2,2); insert into t values (1,2,3); insert into t values (1,3,3); insert into t values (1,4,3); insert into t values (2,7,8); insert into t values (2,7,9); Step 2) I would like to return the following data set (k, v1_list, v2_list) 1, (1,2,3,4), (1,2,3) 2, (7), (8,9) Step 3) I am able to