I have two tables User_details and Level_details.
User_details table:
ID Name
1 A
2 B
3 C
4 D
5 E
Level_details table:
trns_id Lvl usr_id
66 1 1
66 1 5
77 1 2
77 2 3
66 2 4
66 2 3
I am expecting the result like:
trns_id Lvl name
66 1 A, E
66 2 D, C
77 1 B
77 2 C
Please suggest the query that should work in lower version of SQL server(below SQl 17).