可以使用ROUND函数来将结果保留两位小数。修改后的语句如下:

SELECT ID, ROUND(((new_users - last_year_new_users) / last_year_new_users) * 100, 2) AS growth_rate FROM temp_0 ORDER BY ID;

如何修改让这个语句的结果growth_rate保留两位小数SELECT IDnew_users - last_year_new_users last_year_new_users 100 AS growth_rateFROM temp_0 order by ID;

原文地址: https://www.cveoy.top/t/topic/hXOw 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录