By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Records: 5 Duplicates: 0 Warnings: 0
id | refID | accountID |
---|---|---|
123 | 1 | 001 |
123 | 2 | 001 |
124 | 3 | 001 |
125 | 4 | 001 |
126 | 5 | 001 |
126 | 6 | 001 |
126 | 7 | 001 |
127 | 4 | 001 |
id | referrals | accountID |
---|---|---|
123 | [1, 2] | 001 |
124 | [3] | 001 |
125 | [4] | 001 |
126 | [5, 6, 7] | 001 |