I tried to sort a group_concat list but keeping getting error. Below is what I’ve tried. If someone can please help.
eg.
customer order_id status
ABC 1234 1
ABC 1235 5
DEF 1236 1
DEF 1237 5
Script used:
GROUP_CONCAT(CAST(status AS STRING), ', ') AS status
result:
customer status
ABC 1, 5
DEF 5, 1
but would like the result to return the following:
customer status
ABC 1, 5
DEF 1, 5
Tried the following script but keep getting error msg:
GROUP_CONCAT(CAST(status AS STRING), ', ') ORDER BY status AS status_ordered,