静流的秋刀鱼 静流的秋刀鱼
关注数: 30 粉丝数: 88 发帖数: 21,398 关注贴吧数: 32
额无法 DEMANDS: Query1.Find the department name and their average salaries, ordered by averagedsalaries in ascending order. Select…. From … where …. Group by …. Order by… select dept_name ,AVG(salary) from Instructor group by dept_nameorder by AVG(salary) Query2.Find the building name and their average budgets, order by averaged budgets indescending order. select building, AVG(budget) from Department group by buildingorder by AVG(budget) DESC Query3.Find department name and one instructor with highest salary for each department,ordered by the department in alphabetic order. select dept_name, MAX(salary) from Instructor group by dept_nameorder by dept_name Query4.List the department name and the number of associated courses, ordered by thenumber of associated courses in descending order. select dept_name, COUNT(title) from Course group by dept_name orderby COUNT(title) DESC Query5.Find the titles of courses in the Comp. Sci. department that have 3 credits. select title from Course where credits="3 " group bydept_name having (dept_name="Science" or dept_name="Computer") Query6.Find the IDs of all students who were taught by an instructor named Einstein; makesure there are no duplicates in the result. select distinct student.ID from student, Instructor, Advisor where(Advisor.i_id=Instructor.id and Instructor.name="Einstein" andAdvisor.s_id=Student.ID) Query7.For all instructors in the university who have taught some course, find their names and the course ID of allcourses they taught select Instructor.name, Teaches.course_id from Teaches, Instructorwhere Instructor.ID=Teaches.ID Query8.list all the courses’ name that were taught in 2009 spring. select Course.name from Section,Course where(Section.course_id=Course.ID and section.year='2009') Query9.Find the names and IDs of all instructors in the History department who havesalary greater than $60,000 select instructor.name, Instructor.ID from Instructorwhere(dept_name like 'History' and salary >60000) Query10.Find all departments’ name where are the students from. select distinctStudent.dept_name from Student Query11.Find the maximum enrollment, across all sections, in Autumn 2009. select MAX(Section.enrollment) from Section whereSection.year='2009' Query12.Find the average salary of instructors in the Computer Science department. select AVG(salary) from Instructor where dept_name like 'Computer' Query13.Find the names of all instructors in the Computer Science department who havesalary greater than $70,000 select Instructor.name from Instructor where dept_name like'Computer' and salary >70000 Query14.Retrieve the names of all instructors, along with their department names anddepartment building name select Instructor.name, Instructor.dept_name, Department.buildingfrom Instructor, Department Query15.Find the highest salary of any instructor. select MAX(salary) from Instructor Query16.Find the sections that had the maximum enrollment in Autumn 2009. select MAX(room_no) from Section where enrollment=MAX(enrollment)and year =2009 Query17.Find the enrollment of each section that was offered in Autumn 2009. select enrollment, room_no from Section where year=2009 group by section.sec_id Query18.List all instructors in the Physics department in alphabetic order. select name from Instructor where Instructor.dept_name like'Physics' order by name Query19.Find all instructors earning the highest salary (there may be more than onewith the same salary). select name from Instructor where salary = MAX(salary) Query20.Find the names and IDs of all instructors in the History department who havesalary less than $5,000. select name, ID from Instructor wheredept_name like 'History' and salary <5000
给怜写的作文……被她给了不及格要重写于是发来了…… 在人们眼中,森林中冒着炊烟的小木屋往往是充满了神奇的童话之地,而废弃的小木屋却往往充斥着恐怖的气息。 但是在另一些生灵们的眼中,森林中冒着炊烟的小木屋却往往充斥着恐怖的气息,而废弃的小木屋往往是千载难逢的宝地。 我们的故事就是从一间作为千载难逢的宝地的废弃的小木屋中开始。 木屋的一角,许多小蜘蛛在 “小七,你知道世界上最好吃的是什么吗?” “应该是蚊子吧?”被称为小七的小蜘蛛歪着脑袋回答。 听见小七的回答,第三只小蜘蛛赶紧插嘴:“我听说有些很大的蜘蛛可以织出非常大的网,能抓住蝗虫!据说那才是最好吃的东西!” “嗯!传说最大的网还能抓住小鸟呢!” “哎?真的吗?明明小鸟那么可怕,一口就能把我们都吃掉!” “就是就是!怎么可能抓住小鸟!” “说谎!” “可是……真的可以啊……”说能抓住小鸟的小蜘蛛显得很委屈。 最开始问最好吃的食物的蜘蛛开口了:“先别管能不能抓住小鸟,世界上最好吃的食物,小七说对了!是蚊子,不过不是一般的蚊子,是一种红白相间的蚊子。” “诶?” “真的啊?” “蚊子还有红白相间的啊……” “真想找机会吃一口!一口就够!” …… 关于红白相间的蚊子的话题持续了很长时间,小七却悄悄地离开了,爬到木屋的窗框上,默默织起网来。 “我在这个地方见过红白相间的蚊子!” 日复一日,善谈的小七似乎变得沉默寡言,其它小蜘蛛找他玩他也不去,终日只是呆呆地望着自己的网。每次感觉到网上有振动他都会满怀期待地飞快爬过去然后再失望地吃掉上面普通的飞虫,或是黑灰色的蚊子。 就这样一天天过去,有时小七甚至会怀疑这里是不是再也不会出现红白相间的蚊子?红白相间的蚊子真的很好吃吗?自己当时是不是眼花了,其实这世界上根本不存在红白相间的蚊子? 正在小七迷茫的时候,空中突然有一个红白相间的影子从小七的网旁擦了过去。 “出现了!”小七心中雀跃不已,趴在网上一动不敢动,盯着空中的蚊子。 可是那只蚊子在窗户上转来转去,仿佛在调戏小七一样在网旁擦过好多次,就是不肯撞在网上,最后转头飞离了小木屋。 小七望着窗外不知飞到哪去了的蚊子,心中想道:一定是因为我的网织得不够大! 这一天,他变得更加沉默起来,每天除了进食和睡觉都在努力织网,小伙伴们一个个或是被鸟吃掉,或是搬家,都离开了小木屋,他依然独自守在这里,带着心中红白相间的蚊子,努力地织着网。 网盖住了整个窗户,他就开始在门上织,门也盖满了,换成屋檐……渐渐地,随着小七长成了大七,整个小木屋密密麻麻布满了蜘蛛网,而网上的猎物也随着小七的成长渐渐从只有飞虫和苍蝇蚊子,到了时而有蝗虫,蚱蜢,蝴蝶,飞蛾…… 独自占有了这么大的一个宝地,七被森林中的蜘蛛们评为“森林杰出蜘蛛”,名利双收,飞黄腾达。 一日,七在窗户的一角查看网上的猎物时看到了一只颜色很稀有的蚊子,没有多加在意,随口吞入腹中。 有时,七也会想起红白相间的蚊子的传说,不过他未曾注意到,他那天随口吞下的颜色稀有的蚊子,就是红白相间的。
首页 1 2 下一页