chopstix21
Technical User
i need to concatenate x values which are grouped by id, ordering them by y column from subquery.
Subquery looks like this
id x y
1 1 1
1 2 3
1 3 2
2 1 null
2 2 1
3 1 1
3 2 2
4 1 null
4 2 null
final results should look like
id result
1 1,3,2
2 2
3 1,2
4 null
Subquery looks like this
id x y
1 1 1
1 2 3
1 3 2
2 1 null
2 2 1
3 1 1
3 2 2
4 1 null
4 2 null
final results should look like
id result
1 1,3,2
2 2
3 1,2
4 null