I am using Pinot DB hence STR,FORMAT,CHAR,POSITION,LOCATE and several functions not supported I have a data with 6 to 8 decimal places I want to round it to Millions and display last 2 decimal points in case of less than million value
Eg. 1677488454 => 1677.49 , 1677484 => 1.68 or 1.67 ( is also fine) , 167748 => 0.16
FUNCTIONS Supported are SUBSTRING,CAST,ROUND
I have tried
SELECT CAST(167748/1000000.0 as DECIMAL(10,2)) as value
yet it shows 0.167748 even for larger no it shows 5 decimal places
Sumeeth Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.