Brug venligst nedenstående forespørgsel,
select col2, GROUP_CONCAT(col3) from data group by col2;
Nedenfor er testcasen,
https://dbfiddle.uk/?rdbms=mysql_8.6cfiddle=ab6cfiddle=ab35fiddle=ab35fiddle=ab35fdfdfe>
Brug venligst nedenstående forespørgsel,
select col2, GROUP_CONCAT(col3) from data group by col2;
Nedenfor er testcasen,
https://dbfiddle.uk/?rdbms=mysql_8.6cfiddle=ab6cfiddle=ab35fiddle=ab35fiddle=ab35fdfdfe>