I'm using below query to generate the percentage in a new column but I want only two decimal places.
SELECT
count( *) TestCount
,count(case when result_status = 'Not A Finding' then 1 end) TestPassedCount
,count(case when result_status = 'Not A Finding' then 1 end) / count(*) ThePercentage
,asset
FROM Table_Name
group by asset
Current Output:
TestCount TestPassedCount Percentage Asset
18 7 0.388888889 DB2MOTIV:[email protected]
Required Output:
TestCount TestPassedCount Percentage Asset
18 7 38.89 DB2MOTIV:[email protected]
Regards,
Bharath Vikas