Reputation: 2093
i have some formula:
CONCAT((SUM(X.lot_qty)-SUM(X.reject))/SUM(X.accept)*100,'%') AS Acceptance
but i get result like:
100.0000%
how to get result as 100.00%?
Upvotes: 1
Views: 1300
Reputation: 455312
You can use the MySQL ROUND function as:
CONCAT(ROUND((SUM(X.lot_qty)-SUM(X.reject))/SUM(X.accept)*100,2),'%') AS Acceptance
Upvotes: 4