ibute Name Data Type StudentID char(11) FirstName varchar(20) LastName varchar(20) Gender char(1) DateofBirth date Courses Attribute Name Data Type CourseCode varchar(6) CourseName varchar(70) Level char(2) Credits int
Having this information.
Students
Attribute Name Data Type
StudentID char(11)
FirstName varchar(20)
LastName varchar(20)
Gender char(1)
DateofBirth date
Courses
Attribute Name Data Type
CourseCode varchar(6)
CourseName varchar(70)
Level char(2)
Credits int
Registration
Attribute Name Data Type
StudentID char(11)
CourseCode varchar(6)
Grade decimal(2, 1)
Write SQL code to:
1. What are the student ID, the names, and birthday of the female students who
were born before the last day of 1992?
2. How many students are registered in the course “PHY210”?
3. How many courses are offered by the department of Computer Science (i.e.
course codes CS***)?
4. Which course(s) (couseCode and courseName) of level G1 give 5 credits?
Step by step
Solved in 3 steps with 4 images