Question: Student ( sid , name, did, avgGrade ) Take ( sid , cid, grade ) Course ( cid , title, credits, did, avgGrade ) Department

Student (sid, name, did, avgGrade)
Take (sid, cid, grade)
Course (cid, title, credits, did, avgGrade)
Department (did, name, avgGrade)
Teacher (tid, name, did, avgGrade)
Teach (tid, cid)
Write the following questions in SQL using the database schema above.
1.(10) List the ID and grades of the student named 'Ali KURT' (name).
2.(10) List the records (i.e. all columns of the course table) of the courses taken by the student named 'Aye KURT' (name) but not taken by the student named 'Ali KURT'.
3.(10) List the students' SIDs and the number of courses they took, their GPA, their highest and lowest grades.
4. List the did's of the departments and the number of students in descending order according to the number of students (Do not write in relational algebra).
5.(10) List the sid's of the professors who teach more than 2 courses, the number of courses they teach and the number of students taking their courses.
6.(10) List the records (list all fields in the student table) of the fields (use take table) from the students in the department named 'Computer Engineering' (department.name) and the courses in the department named 'Electrical Engineering' (department.name).
7. Find the average of the number of students in each course (the number of students taking each course will be determined from the take table, and then the average of these numbers will be found) and list the enrollments of the courses with more students than this average. (first the cids of the courses with more students than the average will be found, then based on these cids the course records in the course table will be found)
8. List the records of students who took two different courses without using GROUP BY.(Since there are 2 different course subjects, the take table needs to be used twice! First, the sids of these students will be found with a (sub)query, then the records in the student table, that is, all columns, will be accessed through these sids.)
9. List the professors who do not teach any lessons (this means there is no record of this teacher in the teaching table).
10. List the records of the instructors (all columns in the teacher table).(That is, all teachers with tid in the teach table)Yukardaki veritabanemasn kullanarak aadaki sorular SQL ile yaznz.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!