早教吧作业答案频道 -->其他-->
SQL.几道数据库题,1)createthecollegedatabaseandtables2)Setintegrityconstrainsandindexofalltheabovetables.3)Inputdataintothetables4)Solvethefollowingqueries(whichrefertothecollegedatabase)inSQL.(3)Findallpair
题目详情
SQL.几道数据库题,
1)create the college database and tables
2) Set integrity constrains and index of all the above tables.
3) Input data into the tables
4) Solve the following queries (which refer to the college database) in SQL.
(3) Find all pairs of student numbers such that both students studied with the same instructor.
(4) Find all triplets of instructors’ names of instructors who taught the same course.
(5) Find course numbers of courses taken by a student and taught by an instructor such that the student is advised by the instructor.
(6) Find all instructors who advise students who took a course from another instructor who is located in the same room.
(7) Find the names of instructors who taught every course taken by a student who lives in New Hampshire.
(8) Find all pairs of names of students and instructors such that the instructor advises the student but the student never took a course with the instructor.
(9) Find courses’ numbers such that two students are enrolled.
(10) Find courses’ numbers such that at least three students are enrolled.
(11) Find the names of instructors who taught every course taught by Prof.Evans.
(12) Find courses’ names of courses taught by every instructor who teaches cs240.
(13) Find students’ numbers,the lowest grade,the highest grade,and the average grade for students who took at least two courses,excluding cs110.
(14) Find instructors’ names for instructors who teach courses that enroll at least two students.
(15) List the names of instructors and the number of students advised by each instructor.
1)create the college database and tables
2) Set integrity constrains and index of all the above tables.
3) Input data into the tables
4) Solve the following queries (which refer to the college database) in SQL.
(3) Find all pairs of student numbers such that both students studied with the same instructor.
(4) Find all triplets of instructors’ names of instructors who taught the same course.
(5) Find course numbers of courses taken by a student and taught by an instructor such that the student is advised by the instructor.
(6) Find all instructors who advise students who took a course from another instructor who is located in the same room.
(7) Find the names of instructors who taught every course taken by a student who lives in New Hampshire.
(8) Find all pairs of names of students and instructors such that the instructor advises the student but the student never took a course with the instructor.
(9) Find courses’ numbers such that two students are enrolled.
(10) Find courses’ numbers such that at least three students are enrolled.
(11) Find the names of instructors who taught every course taught by Prof.Evans.
(12) Find courses’ names of courses taught by every instructor who teaches cs240.
(13) Find students’ numbers,the lowest grade,the highest grade,and the average grade for students who took at least two courses,excluding cs110.
(14) Find instructors’ names for instructors who teach courses that enroll at least two students.
(15) List the names of instructors and the number of students advised by each instructor.
▼优质解答
答案和解析
楼主,你好!
根据你发问的问题和追问的评论,我觉得你应该先去把SQL的基本语法都掌握一下,然后根据实例去提高自己的数据库水平!
祝你早日成为DBA!
根据你发问的问题和追问的评论,我觉得你应该先去把SQL的基本语法都掌握一下,然后根据实例去提高自己的数据库水平!
祝你早日成为DBA!
看了SQL.几道数据库题,1)cr...的网友还看了以下:
1又8分之5=几除以几=几分之26=几填小数1.6=几除以几=几分之40=几填分数一个正方体的体积是 2020-03-30 …
1又8分之5=几除以几=几分之26=几填小数1.6=几除以几=几分之40=几填分数一个正方体的体积是 2020-03-30 …
在括号里填上合适的质数二十六等于几乘几十二等于几加几加几十八等于几加几加几把你几家几三尺三等于几乘 2020-04-13 …
用分数表示下面除法算式的商,是假分数的要化成带分数或整数.9÷5=几分之几21÷19=几分之几48 2020-04-26 …
说出下面各数在几万和几万之间363975在几万和几万之间85003在几万和几万之间99923说出下 2020-06-15 …
InSQL,()causesanobject(atable,forexample)tobecrea 2020-07-26 …
SQL.几道数据库题,1)createthecollegedatabaseandtables2)Se 2020-11-01 …
甲是乙的三分之一,求甲比乙少几分之几?乙是甲的几分之几?乙比甲多几分之几?甲占甲乙和的几分之几?乙占 2020-11-29 …
2分之1:3分之1:6分之1等于几:几:几,化为最简整数比化为最简整数比0.3:0.15:0.45= 2020-12-17 …
质数排座位.小头爸爸给大头儿子出了一道算式题,但是这个算式很奇怪,里面一个数都没有:A=(几+几+几 2020-12-17 …