ISC 305 Assignment
ISC 305 Assignment
1. Create a Database
USE Training;
-- Students Table
CREATE TABLE Students (
RegNo VARCHAR(25) PRIMARY KEY,
StudName VARCHAR(50) NOT NULL,
DateOfBirth,
DegreeCourse VARCHAR(100) NOT NULL
);
-- Courses Table
CREATE TABLE Courses (
CourseCode VARCHAR(10) PRIMARY KEY,
Title VARCHAR(100) NOT NULL,
Dept VARCHAR(50)
);
-- Registration Table
CREATE TABLE Registration (
CourseCode VARCHAR(10),
RegNo VARCHAR(15),
TotalMark INT
);
USE Training;
3. SQL Queries
i. Retrieve the name of each student who registered in the course titled 'Database Systems'
iii. Retrieve for each student the average mark attained for the courses registered for