LMSouq
database Open

MySQL DISTINCT on a GROUP_CONCAT()

US
user371990
1 month ago
3 views
Problem Description
I am doing `SELECT GROUP_CONCAT(categories SEPARATOR ' ') FROM table`. Sample data below: categories ---------- test1 test2 test3 test4 test1 test3 test1 test3 However, I am getting `test1 test2 test3 test4 test1 test3` back and I would like to get `test1 test2 test3 test4` back. Any ideas? Many thanks!

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base