全球旧事资料 分类
“52倍速光驱”商品的订购数量,订购平均价和订购总金额。
selectSUMQtyastotalqAVGPriceastotalpfromorderDetailwhereProductNoi
selectdisti
ctProductNofromproductwhereProductName52倍速光驱avgpricesumQtyPriceas
(9)查询订购了“52倍速光驱”商品且订货数量界于24之间的订单编号,订货数量和订货金额。
selectQtyPriceOrderNofromorderDetailwhereProductNoi
selectdisti
ctProductNofromproductwhereProductName52倍速光驱a
dOrderNobetwee
200801090002a
d200801090004
(10)在订单主表中查询每个业务员的订单数量
selectsale
oCOUNTfromorderMastergroupbySaleNo
3
f数据库原理实验
学号:123012008xxx姓名:xxx班级(x)小班日期:2010年月日
(11)统计在业务科工作且在1973年或1967年出生的员工人数和平均工资。
selectCOUNTaspeoplesumAVGSalsryasavgsfromemployeewherebirthdaylike1973orbirthdaylike1967a
d
Departme
t业务科
(12)在订单明细表中统计每种商品的销售数量和金额,并按销售金额的升序排序输出。
selectQtyPricefromorderDetailorderbyQtyPriceasc
(13)统计客户号为“C20050001”的客户的订单数,订货总额和平均订货金额
selectSUMbQtyasqsumavgbPriceaspavgSUMQtyPriceasqpfromorderMasteraorderDetailbwherecustomerNoc2005004a
daOrderNobOrderNo
(14)统计每个客户的订单数,订货总额和平均订货金额。
selectcustomer
oCOUNTcustomerNoavgbPriceaspavgSUMQtyPriceasqpfromorderMasteraorderDetailbwhereaOrderNobOrderNogroupbycustomerNo
(15)查询订单中至少包含3种(含3种)以上商品的订单编号及订购次数,且订购的商品数量在3件(含3件)以上。(16)查找订购了“32MDRAM”的商品的客户编号,客户名称,订货总数量和订货总金额。
selectdisti
ctcustomerCustomerNocustomer
ameorderMasterOrdersumQtyfromorderMastercustomerorderDetailwhereProductNoi
selectdisti
ctProductNofromproductwhereProductName32MDRAMa
dorderMastercustomerNocustomerCustomerNoa
dorderDetailOrderNoorderMasterOrderNo
4
f数据库原理实验
学号:123012008xxx姓名:xxx班级(x)小班日期:2010年月日
(17)查询每个客户订购的商品编号,商品所属类别,商品数量及订货金额,结果显示客户名称,商品所属类别,商品数量及订货金额,并按客户编号升序和按订货金额的降序排序输出。(18)按商品类别查询每类商品的订货平均单价在280元(含280元)以上的订货总数量,订货平均单价和订货总金额。(19)查找至少有2次销售的业务员名称和销售日期。(20)查询销售金额最大的客户名称和总货款额(21)查找销售总额小于5000元r
好听全球资料 返回顶部