I have two tables in my database:
Table1:
| id | name |
+--------+------------+
| 100 | john |
| 200 | Ali |
Table2:
| id | account | bank |
+------+-----------+--------+
| 100 | AAAAAAA | bnk1 |
| 100 | BBBBBBB | bnk2 |
| 200 | XXXXXXX | bnk1 |
This means "john" has two different accounts in two different banks
Now I want a query to show this:
| id | tab2 |
+------+----------------------------+
| 100 | AAAAAAAbank1 - BBBBBBBbnk2 |
| 200 | XXXXXXXbnk1 |
Is it possible?