I have tb1 table like this :
name email link
john [email protected] google
john [email protected] facebook
john [email protected] 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 [email protected] twitter
john [email protected] facebook/google
....
....
and more
I want make result looks like :
NAME EMAIL SOURCE 1 SOURCE 2
john [email protected] twitter
john [email protected] facebook google
It's possible to make result only with query?
Note : I want to make dynamic column source 1, 2, 3 ...., n