Solución:
Puedes usar ORDER BY
dentro de GROUP_CONCAT
funcionar de esta manera:
SELECT li.client_id, group_concat(li.percentage ORDER BY li.views ASC) AS views,
group_concat(li.percentage ORDER BY li.percentage ASC)
FROM li GROUP BY client_id
El group_concat admite su propia cláusula order by
MySQL – The GROUP_CONCAT() function
Entonces deberías poder escribir:
SELECT li.clientid, group_concat(li.views order by views) AS views,
group_concat(li.percentage order by percentage)
FROM table_views GROUP BY client_id
Tratar
SELECT li.clientid, group_concat(li.views ORDER BY li.views) AS views,
group_concat(li.percentage ORDER BY li.percentage)
FROM table_views li
GROUP BY client_id
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function%5Fgroup-concat
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)