此选择语句给出的数数 :
- 同样的阴道
- 同样的猫Name
但有不同的销售额
Select p.CatCode, p.CatName, s.Sales_Amt
From A3_Dw_Prod p, A3_Dw_Sales s
Order By p.Dw_Prod_Id Desc;
I would Like to use Sum Function to add the these Categories and Group Them When I use Sum I get an Error
ORA-00979:不是按表达方式划分的组别
Select p.CatCode, p.CatName, Sum(s.Sales_Amt)
From A3_Dw_Prod p, A3_Dw_Sales s
Where p.Dw_Prod_Id = s.Dw_Prod_Id
Group By p.CatCode, p.CatName
Order By p.Dw_Prod_Id Desc;