基本上,以下代码返回正确的信息,但我需要将数量加在一起,以带回一个记录。有没有办法做到这一点?
select category.category_name, (equipment.total_stock-equipment.stock_out) AS Current_Stock, equipment.stock_out
from
EQUIPMENT,
CATEGORY
WHERE EQUIPMENT.CATEGORY_ID = CATEGORY.CATEGORY_ID
and category.category_name = Power Tools