mysql随手记

-- ROUND截取小数点2位

ROUND(SUM(pay_mony),2) 

 

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随手记

上一篇:SQL中的表


下一篇:spark读写mysql