下载此文档

数据库作业.doc


文档分类:IT计算机 | 页数:约7页 举报非法文档有奖
1/7
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/7 下载此文档
文档列表 文档介绍
班级:软件工程 1班姓名:刘辰欢学号: 2012551413 a. select title from course where dept name =’ Comp. Sci. ’ and credits =3 b. select distinct from ( student join takes using ( ID )) join ( instructor join teaches using ( ID )) using ( course id, sec id, semester , year ) where =’ Einstein ’ As an alternative to th join .. using syntax above the query can be written by enumerating relations in the from clause, and adding the corresponding join predicates on ID, course id, section id, semester , and year to the where clause. Note that using natural join in place of join .. using would result in equating student ID with instructor ID, which is incorrect. c. select max ( salary ) from instructor d. select ID, name from instructor where salary =( select max ( salary ) from instructor ) e. select course id, sec id, count ( ID ) from section natural join takes where semester =’ Autumn ’ and year = 2009 group by course id, sec id select course id, sec id,( select count ( ID ) from takes where = and = and takes . course id= section . course id and takes . section id= section . section id) from section where semester =’ Autumn ’ and year = 2009 f. select max ( enrollment ) from ( select count ( ID ) as enrollment from section natural join takes where semester =’ Autumn ’ and year = 2009 group by course id, sec id) g. w

数据库作业 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数7
  • 收藏数0 收藏
  • 顶次数0
  • 上传人luyinyzha
  • 文件大小0 KB
  • 时间2016-07-04