SELECT province, COUNT( 1 ), SUM(is_shipped = 0) AS notship, SUM(is_shipped = 0)/COUNT(1) AS notshipRatio FROM sysOrders WHERE is_delete = 0 AND DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= DATE(add_time) GROUP BY province ORDER BY province; 估计这个应该是正解。