The GROUP BY
clause will return one row for each value grouped by. Since you have three material_status values you are getting three rows returned. Simply remove that clause and you will get one line in the results since all of your columns are aggregate.
SELECT SUM...
FROM purchase_order
The ORDER BY
clause is also not necessary since you are only returning one row.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.