-2

Mountains' Table:
Mountains' Table

I want to write a query that concatenates the countries that are in the same mountain. So, in the result table, I'll have one a time the name of the mountain and a column which is named countries with the concatenated countries separated with commas.

Dharman
  • 30,962
  • 25
  • 85
  • 135

1 Answers1

0
SELECT  GROUP_CONCAT (Country) as "country" 
FROM table_name group by Mountain;

Use GROUP_CONCAT you can learn more about it here:- GROUP_CONCAT