数据库期中习题及部分答案.docVIP

  • 42
  • 0
  • 约1.33万字
  • 约 12页
  • 2016-12-02 发布于贵州
  • 举报
数据库期中习题及部分答案

1、查找表中所有姓刘的职工的工号,部门,薪水 selectemp_no,emp_name,dept,salary fromemployee whereemp_name like 刘% 2、查找所有定单金额高于20000的所有客户编号 selectcust_id from sales wheretot_amt20000 3、查找出职称为经理和职称为职员的女员工的姓名、职称、性别。 selectemp_name,title,sex fromemployee wheretitle=经理ortitle=职员and sex=F 4、选取销售数量最多的前5条订单订单号、数量。 select top5 with tiesorder_no,sup_id,qty fromsale_item order byqty desc 5、按部门进行汇总,统计每个部门的总工资 selectdept,sum(salary) fromemployee group bydept 6、由employee表中查找出薪水最高的员工信息。 select * fromemployee wheresalary= (selectmax(salary ) fromemployee ) 7、由sales表中查找出订单金额大于“E0013业务员在1996/10/15这天所接每一张订单的金额”的所有订单。

文档评论(0)

1亿VIP精品文档

相关文档