I have a table which contains rows like below
ID User Department
1 User1 Admin
2 User1 Accounts
3 User2 Finance
4 User3 Sales
5 User3 Finance
I need a select query which results following format
ID User Department
1 User1 Admin,Accounts
2 User2 Finance
3 User3 Sales, Finance
See Question&Answers more detail:os