I have tb1 table like this :
name email link
john myemail@gmail.com google
john myemail@gmail.com facebook
john myemail2@gmail.com twitter
....
....
and more
When I call data with query looks like
SELECT name, email, group_concat(DISTINCT link SEPARATOR '/') as source
FROM tb1
group by email
And result Like this :
NAME EMAIL SOURCE
john myemail2@gmail.com twitter
john myemail@gmail.com facebook/google
....
....
and more
I want make result looks like :
NAME EMAIL SOURCE 1 SOURCE 2
john myemail2@gmail.com twitter
john myemail@gmail.com facebook google
It's possible to make result only with query?
Note : I want to make dynamic column source 1, 2, 3 ...., n