during my search for mentioned in topic title, i found a stackoverflow link which is more than 10 years old and i am using 21c, it is working fine but i want to know is there any other approach / new function by oracle which can help to achieve this using SQL command? this is required to generate Charts/Graphs in Oracle Apex.
https://stackoverflow.com/questions/19522582/1000000-to-1m-and-1000-to-1k-in-oracle-query
WITH DATA AS (SELECT power(10, ROWNUM) num FROM dual CONNECT BY LEVEL <= 9)
SELECT num,
CASE
WHEN num >= 1e6 THEN
round(num / 1e6) || 'M'
WHEN num >= 1e3 THEN
round(num / 1e3) || 'k'
ELSE to_char(num)
END conv
FROM DATA;

please help.
regards
i can use round(figure, 2) to get 1.2M , currently it will show 1M for 1200000