标签:ring keyword round string tab style from code alc
1,不带小数点的百分比
SELECT CONCAT(ROUND(errorTable.errorCount / totalTable.totalCount * 100),‘‘,‘%‘) FROM (SELECT COUNT(*) AS totalCount FROM dw_audit WHERE data_level = #{dataLevel} AND task_type = #{taskType}) AS totalTable, (SELECT COUNT(*) AS errorCount FROM dw_audit WHERE data_level = #{dataLevel} AND task_type = #{taskType} AND task_state = #{taskState}) AS errorTable
2,带小数点的百分比
CONCAT(ROUND(a.cnt / b.cntSum * 100, 2),‘‘,‘%‘)
标签:ring keyword round string tab style from code alc
原文地址:https://www.cnblogs.com/cailijuan/p/11858890.html