时间:2021-07-01 10:21:17 帮助过:42人阅读
-- ROUND截取小数点2位
ROUND(SUM(pay_mony),2)
-- IFNULL判断是否为空,并替换为空数据
IFNULL(totalmoney,0)
SELECT
asset_state `name`,
COUNT(1) `value`,
ROUND(SUM(use_area),2) data2
FROM
sta_asset_management
WHERE
asset_state IS NOT NULL
AND asset_state != ‘‘
GROUP BY
asset_state
ORDER BY
`value` DESC;
mysql随手记
标签:round money ota order order by sum not 小数点 mon