I have the following data:
╔════╦═══════╦═══════╗ ║ id ║ group ║ place ║ ╠════╬═══════╬═══════╣ ║ 1 ║ 1 ║ a ║ ║ 2 ║ 1 ║ b ║ ║ 3 ║ 1 ║ b ║ ║ 4 ║ 1 ║ a ║ ║ 5 ║ 1 ║ c ║ ║ 6 ║ 2 ║ a ║ ║ 7 ║ 2 ║ b ║ ║ 8 ║ 2 ║ c ║ ╚════╩═══════╩═══════╝
How can I get the path of each group in MySQL?
The expected result is:
╔═══════╦════════════╗ ║ group ║ path ║ ╠═══════╬════════════╣ ║ 1 ║ a-b-a-c ║ ║ 2 ║ a-b-c ║ ╚═══════╩════════════╝