Is there any way that I can use the output of subquery as the fields of the next query?
SELECT TEAM_ID, ID1, ID2, ID3 FROM XYZ;
to
SELECT TEAM_ID, (SELECT IDs FROM ABC WHERE GROUP_ID="1") FROM XYZ;
Schema for XYZ
TEAM_ID, ID1, ID2, ID3
50, B001, A003, S001
60, B002, A111, M001
Schema for ABC
Group_ID, IDs
1, ID1,ID2,ID3
2, ID1,ID3
3, ID2
Now, I want: TEAM_ID, ID1, ID2, ID3 50, B001, A003, S001
Based on Group_ID=1