Mysql tables structure is
B1 //table 1
aid name
1 aaa
2 bbb
3 ccc
4 ddd
B2 //table 2
bid aid
111 1
222 2
333 3
444 3
555 4
I want to display data like following
aid bid name
1 111 aaa
2 222 bbb
3 333,444 ccc
4 555 ddd
I tried to do but not getting result as expected. How to do this using subquery or joins?
Thank you.