एक समाधान यह होगा:(यह अच्छा नहीं लगता, लेकिन यह काम करता है)
SELECT
TRIM(TRAILING '0' FROM
TRIM(TRAILING '1' FROM
TRIM(TRAILING '2' FROM
TRIM(TRAILING '3' FROM
-- ...
TRIM(TRAILING '8' FROM
TRIM(TRAILING '9' FROM name)))))) AS name
FROM your_table
फिर आप परिणाम से GROUP BY के साथ चयन कर सकते हैं:
SELECT name, count(*) AS frequency FROM (
-- previous select
) AS t
GROUP BY name