SQL对商品进行分类,且统计各类别销售出的总数量.输入多表查询语句select DB_KC_XS.SP_Name,DB_KC_XS.SP_Price,DB_KC_XS.SP_Num,DB_LB.LB_MC from DB_KC_XS,DB_LB where DB_KC_XS.LB_ID=DB_LB.LB_ID order by SP_Num desc得出下面图而
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/26 20:29:26
![SQL对商品进行分类,且统计各类别销售出的总数量.输入多表查询语句select DB_KC_XS.SP_Name,DB_KC_XS.SP_Price,DB_KC_XS.SP_Num,DB_LB.LB_MC from DB_KC_XS,DB_LB where DB_KC_XS.LB_ID=DB_LB.LB_ID order by SP_Num desc得出下面图而](/uploads/image/z/7923519-63-9.jpg?t=SQL%E5%AF%B9%E5%95%86%E5%93%81%E8%BF%9B%E8%A1%8C%E5%88%86%E7%B1%BB%2C%E4%B8%94%E7%BB%9F%E8%AE%A1%E5%90%84%E7%B1%BB%E5%88%AB%E9%94%80%E5%94%AE%E5%87%BA%E7%9A%84%E6%80%BB%E6%95%B0%E9%87%8F.%E8%BE%93%E5%85%A5%E5%A4%9A%E8%A1%A8%E6%9F%A5%E8%AF%A2%E8%AF%AD%E5%8F%A5select+DB_KC_XS.SP_Name%2CDB_KC_XS.SP_Price%2CDB_KC_XS.SP_Num%2CDB_LB.LB_MC+from+DB_KC_XS%2CDB_LB+where+DB_KC_XS.LB_ID%3DDB_LB.LB_ID+order+by+SP_Num+desc%E5%BE%97%E5%87%BA%E4%B8%8B%E9%9D%A2%E5%9B%BE%E8%80%8C)
SQL对商品进行分类,且统计各类别销售出的总数量.输入多表查询语句select DB_KC_XS.SP_Name,DB_KC_XS.SP_Price,DB_KC_XS.SP_Num,DB_LB.LB_MC from DB_KC_XS,DB_LB where DB_KC_XS.LB_ID=DB_LB.LB_ID order by SP_Num desc得出下面图而
SQL对商品进行分类,且统计各类别销售出的总数量.
输入多表查询语句select DB_KC_XS.SP_Name,DB_KC_XS.SP_Price,DB_KC_XS.SP_Num,DB_LB.LB_MC from DB_KC_XS,DB_LB where DB_KC_XS.LB_ID=DB_LB.LB_ID order by SP_Num desc得出下面图
而我要的结果是 安踏 99 4 服装类
笔记本 10 2 办公用品
水杯 21 2 办公用品
铅笔 2 2 办公用品
求各位朋友要怎么处理.谢谢!
SQL对商品进行分类,且统计各类别销售出的总数量.输入多表查询语句select DB_KC_XS.SP_Name,DB_KC_XS.SP_Price,DB_KC_XS.SP_Num,DB_LB.LB_MC from DB_KC_XS,DB_LB where DB_KC_XS.LB_ID=DB_LB.LB_ID order by SP_Num desc得出下面图而
select DB_KC_XS.SP_Name,DB_KC_XS.SP_Price,sum(DB_KC_XS.SP_Num) as sp_num,DB_LB.LB_MC from DB_KC_XS,DB_LB where DB_KC_XS.LB_ID=DB_LB.LB_ID group by DB_KC_XS.SP_Name,DB_KC_XS.SP_Price,DB_LB.LB_MC order by SP_Num desc
而且,老兄, 铅笔 应该是
铅笔 2 3 办公用品