I have two tables,
Table A has users' info, name, address.etc
Table B has notes that created by users in Table A, each user can create multiple notes.
I need to create an Excel report that contain all users and their notes. Since each user can create multiple notes, I want to combine individual user's notes into one cell. Is there a way to do this in SQL stored procedure? thanks
tableA.userid as `Id`,
tableA.username as `User`,
GROUP_CONCAT(tableB.note) as `Notes`