SELECT count(w.c1) AS count
, w.c1 AS color
FROM
data w
GROUP BY
w.c1
ORDER BY
w.id DESC
LIMIT
50000;
I'm wondering, is there any kind of mysql query to group by zerofill values, i have all values in c1 as rgb code '0002500034
' (r=000/g=250/b=034)
, after query it shows like 000250034->250034