I have a database with email and phone columns. One email can have several phones, which results in multiple rows with same email but different phone numbers.
I want to query all emails with it’s phones grouped in one single column.
Example
Convert from this
11111 [email protected]
22222 [email protected]
33333 [email protected]
44444 [email protected]
To this
[email protected] 11111, 22222, 33333, 44444
Thanks!
2
Answers
I found it
Thanks!
group_concat
to the rescue: