-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathcreate_student_grades_database.sql
More file actions
33 lines (30 loc) · 1.05 KB
/
create_student_grades_database.sql
File metadata and controls
33 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
CREATE TABLE Students (
student_id int,
student_name varchar(20),
date_of_birth date);
INSERT INTO Students (student_id, student_name, date_of_birth)
VALUES (101, 'Alexis', '1/1/2001'),
(102, 'Brianna', '2/2/2002'),
(103, 'Chloe', '3/3/2001'),
(104, 'Daniel', '4/4/2002'),
(105, 'Emily', '5/5/2001');
CREATE TABLE Grades (
grade_id int,
student_id int,
course_name varchar(100),
final_grade int);
INSERT INTO Grades (grade_id, student_id, course_name, final_grade)
VALUES (511, 101, 'Intro to SQL', 98),
(512, 101, 'Linear Algebra', 91),
(513, 101, 'Advanced Stats', 95),
(514, 102, 'Intro to SQL', 82),
(515, 102, 'Advanced Stats', 85),
(516, 103, 'Linear Algebra', 75),
(517, 103, 'Advanced Stats', 79),
(518, 104, 'Intro to SQL', 99),
(519, 105, 'Intro to SQL', 95),
(520, 105, 'Linear Algebra', 85),
(521, 105, 'Advanced Stats', 80),
(522, 106, 'Intro to SQL', 86),
(523, 106, 'Linear Algebra', 92),
(524, 106, 'Advanced Stats', 96);