Mysql Query Help

Hi

I need a mysql query for below data table where duplicate row remark will be reflect in new column

Name City PhoneNumber Gender Remark Remark 2
Akshay India 9892323 M Heel 1
Simran Duabai 2392974924 M Jell 2
Rohit Malawi 2749247 M Hello 3
Rana Singapore 2947294 M Kaka 4
Govind India 2479247 M mma 5
Maka India 29479247 M dbbdd 6
Simran Duabai 2392974924 M onksnf 7
Rohit Malawi 2749247 M sfsfsf 8

I need an output in below format

Name City PhoneNumber Gender Remark Remark 2 RemarkN RemarkN
Akshay India 9892323 M Heel 1
Simran Duabai 2392974924 M Jell 2 onksnf 7
Rohit Malawi 2749247 M Hello 3 sfsfsf 8
Rana Singapore 2947294 M Kaka 4
Govind India 2479247 M mma 5
Maka India 29479247 M dbbdd 6

SQLTeam.com is a Microsoft SQL Server website, we're not experts in MySQL.

I found a few links for creating pivots in MySQL:

1 Like

Dear Robert Volk

Thanks, If anything you can help me in SQL Query