SELECT consignee, goods_name, SUM(goods_loading_quantity) FROM electronic_circuit
where \n" +
" goods_name in (SELECT name FROM precursor_chemicals
) and destination LIKE ‘%金山区%’ and consignee not in(SELECT name from consignee_business)\n" +
“and DATE_FORMAT(end_time,’%Y%m’) =’”+yearMonth+"‘and goods_name=’"+s+"’" +
"GROUP BY consignee
SUM(goods_loading_quantity)写成
cast(sum(goods_loading_quantity) AS decimal(15,2))即可
mysql sum函数后面好多位小数点解决方式
最新推荐文章于 2024-07-15 03:29:52 发布