-
Notifications
You must be signed in to change notification settings - Fork 1
/
updated.sql
595 lines (486 loc) · 18.2 KB
/
updated.sql
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
create database onestop
use onestop
-- FinanceAccountant Table
CREATE TABLE FinanceAccountants (
UserID INT PRIMARY KEY IDENTITY(1,1),
Email NVARCHAR(255) NOT NULL UNIQUE,
Password NVARCHAR(255) NOT NULL,
Address NVARCHAR(255),
Name NVARCHAR(255),
Designation NVARCHAR(255)
);
--drop TABLE FinanceAccountants
-- Student Table
CREATE TABLE Students (
UserID INT PRIMARY KEY IDENTITY(1,1),
Email NVARCHAR(255) NOT NULL UNIQUE,
Password NVARCHAR(255) NOT NULL,
Address NVARCHAR(255),
Name NVARCHAR(255),
RollNumber NVARCHAR(50),
Degree NVARCHAR(50),
Batch NVARCHAR(50),
Campus NVARCHAR(50),
Status NVARCHAR(50),
DegreeStatus NVARCHAR(50)
);
--drop TABLE Students
-- FinancialRecords Table
CREATE TABLE FinancialRecords (
RecordID INT PRIMARY KEY IDENTITY(1,1) ,
DegreeFee INT,
CourseFee INT,
Funds INT,
UserID INT,
FOREIGN KEY (UserID) REFERENCES Students(UserID)
);
--drop TABLE FinancialRecords
-- StudentAcademicRecord Table
CREATE TABLE StudentAcademicRecords (
RecordID INT PRIMARY KEY IDENTITY(1,1),
UserID INT,
CGPA FLOAT,
CreditHours FLOAT,
FOREIGN KEY (UserID) REFERENCES Students(UserID)
);
--drop TABLE StudentAcademicRecords
-- Courses associated with a StudentAcademicRecord
CREATE TABLE Courses (
CourseID INT PRIMARY KEY IDENTITY(1,1),
RecordID INT,
CourseName NVARCHAR(255),
Grade NVARCHAR(5),
FOREIGN KEY (RecordID) REFERENCES StudentAcademicRecords(RecordID)
);
-- ComplaintForm Table
CREATE TABLE ComplaintForm (
ComplaintID INT PRIMARY KEY IDENTITY(1,1),
Date DATETIME,
Status NVARCHAR(255),
Complaint NVARCHAR(1000)
);
-- DegreeIssuanceForm Table
CREATE TABLE DegreeIssuanceForms (
FormID INT PRIMARY KEY IDENTITY(1,1),
RequestDate DATETIME,
CurrentStatus NVARCHAR(255)
);
-- Transcript Table
CREATE TABLE Transcript (
TranscriptID INT PRIMARY KEY IDENTITY(1,1),
Date NVARCHAR(50),
GPA FLOAT,
UserID INT,
FOREIGN KEY (UserID) REFERENCES Students(UserID)
);
-- Degrees Table
CREATE TABLE Degree (
DegreeID INT PRIMARY KEY IDENTITY(1,1),
DateOfIssuance DATETIME,
GraduatingCGPA FLOAT,
Signature NVARCHAR(255),
UserID INT,
FOREIGN KEY (UserID) REFERENCES Students(UserID)
);
-- DegreeRequest Table
CREATE TABLE DegreeRequests (
Token UNIQUEIDENTIFIER DEFAULT NEWID(),
DateReceived DATETIME,
Status NVARCHAR(255),
AdminApproved BIT,
FYPApproved BIT,
FinanceApproved BIT,
UserID INT FOREIGN KEY REFERENCES Students(UserID),
PRIMARY KEY (Token)
);
-- Admin Table
CREATE TABLE Admins (
UserID INT PRIMARY KEY IDENTITY(1,1),
Email NVARCHAR(255) NOT NULL UNIQUE,
Password NVARCHAR(255) NOT NULL,
Address NVARCHAR(255),
Name NVARCHAR(255),
Designation NVARCHAR(255)
);
-- StudentComplaint Table
CREATE TABLE StudentComplaints (
ComplaintID INT PRIMARY KEY IDENTITY(1,1),
StudentID INT,
Status NVARCHAR(255),
Type NVARCHAR(255),
Date DATETIME,
ComplaintText NVARCHAR(1000),
FOREIGN KEY (StudentID) REFERENCES Students(UserID)
);
select* from Notifications
-- Notification Table
CREATE TABLE Notifications (
NotificationID INT PRIMARY KEY IDENTITY(1,1),
ReceiverID INT,
Text NVARCHAR(100),
Date DATETIME,
FOREIGN KEY (ReceiverID) REFERENCES Students(UserID)
);
-- FYPDeptMember Table
CREATE TABLE FYPDeptMembers (
UserID INT PRIMARY KEY IDENTITY(1,1),
Email NVARCHAR(255) NOT NULL UNIQUE,
Password NVARCHAR(255) NOT NULL,
Address NVARCHAR(255),
Name NVARCHAR(255)
);
-- Director Table
CREATE TABLE Directors (
UserID INT PRIMARY KEY IDENTITY(1,1),
Email NVARCHAR(255) NOT NULL UNIQUE,
Password NVARCHAR(255) NOT NULL,
Address NVARCHAR(255),
Name NVARCHAR(255),
DateOfJoining DATETIME,
DateOfRetirement DATETIME
);
-- FYP Table
CREATE TABLE FYP (
FYPID INT PRIMARY KEY IDENTITY(1,1),
Title NVARCHAR(255),
Domain NVARCHAR(255),
Supervisor NVARCHAR(255),
Grade NVARCHAR(5),
StudentID INT,
FOREIGN KEY (StudentID) REFERENCES Students(UserID)
);
-- Reports Table
CREATE TABLE Report (
ReportID INT PRIMARY KEY IDENTITY(1,1),
Date DATETIME,
NumberOfRequests INT
);
----INSERTION
USE onestop
INSERT INTO FinanceAccountants (Email, Password, Address, Name, Designation)
VALUES ('accountant@example.com', 'securePassword', '123 Finance Road', 'John Doe', 'Chief Financial Officer');
INSERT INTO Students (Email, Password, Address, Name, RollNumber, Degree, Batch, Campus, Status, DegreeStatus)
VALUES ('student@example.com', 'studentPassword', '456 Student Drive', 'Alice Johnson', 'S10001', 'Computer Science', '2023', 'Main', 'Active', 'Enrolled');
INSERT INTO FinancialRecords (DegreeFee, CourseFee, Funds, UserID)
VALUES (5000, 1500, 1000, 1); -- Assuming '1' is a valid UserID from Students table
INSERT INTO StudentAcademicRecords (UserID, CGPA, CreditHours)
VALUES (1, 3.5, 120); -- Assuming '1' is the UserID from the Students table
INSERT INTO Courses (RecordID, CourseName, Grade)
VALUES (1, 'Introduction to Computer Science', 'A'); -- Assuming '1' is a valid RecordID
INSERT INTO ComplaintForm (Date, Status, Complaint)
VALUES (GETDATE(), 'Open', 'Issue with course registration.');
INSERT INTO DegreeIssuanceForms (RequestDate, CurrentStatus)
VALUES (GETDATE(), 'Pending Review');
INSERT INTO Transcript (Date, GPA, UserID)
VALUES ('2023-09', 3.4, 1); -- Assuming '1' is a valid UserID
INSERT INTO Degree (DateOfIssuance, GraduatingCGPA, Signature, UserID)
VALUES ('2023-05-01', 3.6, 'John Smith', 1); -- Assuming '1' is a valid UserID
INSERT INTO DegreeRequests (DateReceived, Status, AdminApproved, FYPApproved, FinanceApproved, UserID)
VALUES (GETDATE(), 'Pending', 0, 0, 0, 1); -- Assuming '1' is a valid UserID
INSERT INTO Admins (Email, Password, Address, Name, Designation)
VALUES ('admin@example.com', 'adminPassword', '789 Admin Blvd', 'Bob Smith', 'Administrator');
INSERT INTO StudentComplaints (StudentID, Status, Type, Date, ComplaintText)
VALUES (1, 'Unresolved', 'Academic', GETDATE(), 'Complaint regarding final grade.');
INSERT INTO Notifications (ReceiverID, Text, Date)
VALUES (1, 'Your request has been processed', GETDATE());
INSERT INTO FYPDeptMembers (Email, Password, Address, Name)
VALUES ('fypmember@example.com', 'fypPassword', '123 FYP Lane', 'Clara Oswald');
INSERT INTO Directors (Email, Password, Address, Name, DateOfJoining, DateOfRetirement)
VALUES ('director@example.com', 'directorPassword', '321 Director Road', 'Steven Moffat', '2018-01-01', '2028-01-01');
INSERT INTO FYP (Title, Domain, Supervisor, Grade, StudentID)
VALUES ('Capstone Project', 'Software Engineering', 'Dr. Who', 'A', 1);
INSERT INTO Report (Date, NumberOfRequests)
VALUES (GETDATE(), 10);
-- Select all data from the FinanceAccountants table
SELECT * FROM FinanceAccountants;
-- Select all data from the Students table
SELECT * FROM Students;
-- Select all data from the FinancialRecords table
SELECT * FROM FinancialRecords;
-- Select all data from the StudentAcademicRecords table
SELECT * FROM StudentAcademicRecords;
-- Select all data from the Courses table
SELECT * FROM Courses;
-- Select all data from the ComplaintForm table
SELECT * FROM ComplaintForm;
-- Select all data from the DegreeIssuanceForms table
SELECT * FROM DegreeIssuanceForms;
-- Select all data from the Transcript table
SELECT * FROM Transcript;
-- Select all data from the Degree table
SELECT * FROM Degree;
-- Select all data from the DegreeRequests table
SELECT * FROM DegreeRequests;
-- Select all data from the Admins table
SELECT * FROM Admins;
-- Select all data from the StudentComplaints table
SELECT * FROM StudentComplaints;
-- Select all data from the Notifications table
SELECT * FROM Notifications;
-- Select all data from the FYPDeptMembers table
SELECT * FROM FYPDeptMembers;
-- Select all data from the Directors table
SELECT * FROM Directors;
-- Select all data from the FYP table
SELECT * FROM FYP;
-- Select all data from the Report table
SELECT * FROM Report;
INSERT INTO Students (Email, Password, Address, Name, RollNumber, Degree, Batch, Campus, Status, DegreeStatus)
VALUES
('student2@example.com', 'password2', '457 Student Drive', 'Bob Brown', 'S10002', 'Mathematics', '2022', 'Main', 'Active', 'Enrolled'),
('student3@example.com', 'password3', '458 Student Drive', 'Clara Smith', 'S10003', 'Physics', '2022', 'Main', 'Active', 'Enrolled'),
('student4@example.com', 'password4', '459 Student Drive', 'Dave Wilson', 'S10004', 'Chemistry', '2023', 'Main', 'Active', 'Enrolled'),
('student5@example.com', 'password5', '460 Student Drive', 'Ella Martinez', 'S10005', 'Biology', '2023', 'Main', 'Active', 'Enrolled'),
('student6@example.com', 'password6', '461 Student Drive', 'Franklyn Jose', 'S10006', 'English', '2024', 'Main', 'Active', 'Enrolled');
-- Insert additional DegreeRequests
INSERT INTO DegreeRequests (DateReceived, Status, AdminApproved, FYPApproved, FinanceApproved, UserID)
VALUES
(GETDATE(), 'Pending', 0, 0, 0, 2),
(GETDATE(), 'Pending', 0, 0, 0, 3),
(GETDATE(), 'Pending', 0, 0, 0, 4),
(GETDATE(), 'Pending', 0, 0, 0, 5),
(GETDATE(), 'Pending', 0, 0, 0, 6);
INSERT INTO FinanceAccountants (Email, Password, Address, Name, Designation)
VALUES
('accountant2@example.com', 'securePassword2', '124 Finance Road', 'Jane Doe', 'Financial Analyst'),
('accountant3@example.com', 'securePassword3', '125 Finance Road', 'Alice Brown', 'Senior Accountant'),
('accountant4@example.com', 'securePassword4', '126 Finance Road', 'Bob White', 'Accountant'),
('accountant5@example.com', 'securePassword5', '127 Finance Road', 'Eve Black', 'Treasurer'),
('accountant6@example.com', 'securePassword6', '128 Finance Road', 'Victor Green', 'Finance Officer');
-- Assuming UserIDs from 2 to 6 are valid
INSERT INTO FinancialRecords (DegreeFee, CourseFee, Funds, UserID)
VALUES
(6000, 2000, 1500, 2),
(5000, 2500, 1200, 3),
(4500, 1800, 1000, 4),
(5200, 1900, 1600, 5),
(5500, 2100, 1300, 6);
select* from FinancialRecords
-- Assuming UserIDs from 2 to 6 are valid
INSERT INTO StudentAcademicRecords (UserID, CGPA, CreditHours)
VALUES
(2, 3.8, 125),
(3, 3.9, 130),
(4, 3.6, 120),
(5, 3.7, 115),
(6, 3.85, 128);
-- Assuming RecordIDs from 2 to 6 are valid
INSERT INTO Courses (RecordID, CourseName, Grade)
VALUES
(2, 'Data Structures', 'A'),
(3, 'Algorithms', 'B'),
(4, 'Machine Learning', 'A'),
(5, 'Database Systems', 'B'),
(6, 'Operating Systems', 'A');
-- Assuming RecordIDs from 2 to 6 are valid
INSERT INTO Courses (RecordID, CourseName, Grade)
VALUES
(2, 'Databases', 'A'),
(3, 'Algorithms', 'B'),
(4, 'Marketing Management', 'A'),
(5, 'Artificial Intelligence', 'B'),
(6, 'Data Structures', 'A');
-- Assuming RecordIDs from 2 to 6 are valid
INSERT INTO Courses (RecordID, CourseName, Grade)
VALUES
(3, 'Databases', 'A'),
(2, 'Algorithms', 'B'),
(3, 'Marketing Management', 'A'),
(3, 'Artificial Intelligence', 'B'),
(3, 'Data Structures', 'A');
INSERT INTO Courses (RecordID, CourseName, Grade)
VALUES
(4, 'Databases', 'A'),
(4, 'Algorithms', 'B'),
(5, 'Marketing Management', 'A'),
(4, 'Artificial Intelligence', 'B'),
(4, 'Data Structures', 'A');
INSERT INTO Courses (RecordID, CourseName, Grade)
VALUES
(5, 'Software Engineering', 'A'),
(5, 'Algorithms', 'B'),
(5, 'Project Management', 'A'),
(5, 'Deep Learning', 'B'),
(5, 'Data Structures', 'A');
INSERT INTO Courses (RecordID, CourseName, Grade)
VALUES
(6, 'Software Engineering', 'A'),
(6, 'Information Security', 'B'),
(6, 'Project Management', 'A'),
(6, 'Deep Learning', 'B'),
(6, 'Object Oriented Programming', 'A');
INSERT INTO ComplaintForm (Date, Status, Complaint)
VALUES
(GETDATE(), 'Open', 'Login issue encountered.'),
(GETDATE(), 'Resolved', 'Access denied error on module 3.'),
(GETDATE(), 'Pending', 'Feedback form not submitting.'),
(GETDATE(), 'Open', 'Profile update failure.'),
(GETDATE(), 'Closed', 'Email notifications not being sent.');
INSERT INTO DegreeIssuanceForms (RequestDate, CurrentStatus)
VALUES
(GETDATE(), 'Processing'),
(GETDATE(), 'Approved'),
(GETDATE(), 'Rejected'),
(GETDATE(), 'Pending Review'),
(GETDATE(), 'Completed');
-- Assuming UserIDs from 2 to 6 are valid
INSERT INTO Transcript (Date, GPA, UserID)
VALUES
('2023-10', 3.6, 2),
('2023-11', 3.9, 3),
('2023-12', 3.5, 4),
('2024-01', 3.4, 5),
('2024-02', 3.8, 6);
-- Assuming UserIDs from 2 to 6 are valid
--INSERT INTO Degree (DateOfIssuance, GraduatingCGPA, Signature, UserID)
--VALUES
--('2024-05-01', 3.7, 'Alice Brown', 2),
--('2024-06-01', 3.9, 'Clara Smith', 3),
---('2024-07-01', 3.5, 'Dave Wilson', 4),
--('2024-08-01', 3.4, 'Ella Martinez', 5),
--('2024-09-01', 3.8, 'Franklyn Jose', 6);
-- Assuming UserIDs from 2 to 6 are valid
INSERT INTO DegreeRequests (DateReceived, Status, AdminApproved, FYPApproved, FinanceApproved, UserID)
VALUES
(GETDATE(), 'Pending', 0, 0, 0, 2),
(GETDATE(), 'Pending', 0, 0, 0, 3),
(GETDATE(), 'Rejected', 1, 1, 0, 4),
(GETDATE(), 'Pending', 0, 0, 0, 5),
(GETDATE(), 'Pending', 0, 0, 0, 6);
update DegreeRequests
SET Status = 'Approved', AdminApproved=1, FYPApproved=1, FinanceApproved=1
where UserID=1
INSERT INTO Admins (Email, Password, Address, Name, Designation)
VALUES
('admin2@example.com', 'password7', '790 Admin Blvd', 'Charlie Brown', 'Deputy Administrator'),
('admin3@example.com', 'password8', '791 Admin Blvd', 'Diana Prince', 'Assistant Administrator'),
('admin4@example.com', 'password9', '792 Admin Blvd', 'Edward Nygma', 'Administrative Officer'),
('admin5@example.com', 'password10', '793 Admin Blvd', 'Fiona Gallagher', 'Chief of Staff'),
('admin6@example.com', 'password11', '794 Admin Blvd', 'George Jetson', 'IT Administrator');
-- Assuming StudentIDs from 2 to 6 are valid
INSERT INTO StudentComplaints (StudentID, Status, Type, Date, ComplaintText)
VALUES
(2, 'Open', 'Technical', GETDATE(), 'Issue with Wi-Fi connectivity.'),
(3, 'Resolved', 'Service', GETDATE(), 'Cafeteria services are unsatisfactory.'),
(4, 'Pending', 'Academic', GETDATE(), 'Discrepancy in grade posting.'),
(5, 'Open', 'Facility', GETDATE(), 'Gym equipment is outdated.'),
(6, 'Closed', 'Technical', GETDATE(), 'Laptop loan process was cumbersome.');
select* from DegreeRequests
---- UPDATE TABLES
alter table DegreeRequests
add AdminComments VARCHAR(100)
alter table DegreeRequests
add FYPComments VARCHAR(100)
alter table DegreeRequests
add FinanceComments VARCHAR(100)
select* from DegreeRequests
---- UPDATE ON 5/5/2024
alter table StudentComplaints
add AdminComments VARCHAR(300)
GO
CREATE TRIGGER trg_UpdateStatusAfterInsert
ON DegreeRequests
AFTER INSERT
AS
BEGIN
-- Update Status to "Approved" if all three approvals are 1
UPDATE DegreeRequests
SET Status = 'Approved'
FROM DegreeRequests dr
INNER JOIN inserted i
ON dr.Token = i.Token -- Using Token as the joining key
WHERE i.AdminApproved = 1
AND i.FYPApproved = 1
AND i.FinanceApproved = 1;
END
GO
CREATE TRIGGER trg_UpdateStatusAfterUpdate
ON DegreeRequests
AFTER UPDATE
AS
BEGIN
-- Update Status to "Approved" if all three approvals are 1
UPDATE DegreeRequests
SET Status = 'Approved'
FROM DegreeRequests dr
INNER JOIN inserted i
ON dr.Token = i.Token -- Using Token as the joining key
WHERE i.AdminApproved = 1
AND i.FYPApproved = 1
AND i.FinanceApproved = 1
AND i.Status <> 'Approved'; -- Prevent unnecessary updates
END
---UPDATE THIS AND INSERTIONS IN COURSES AND ACADEMIC RECORDS TABLE 5/7/2024
INSERT INTO Degree (DateOfIssuance, GraduatingCGPA, Signature, UserID)
VALUES
(GETDATE(), 3.8, 'John Smith', 2),
(GETDATE(), 3.7, 'John Smith', 3),
(GETDATE(), 3.9, 'John Smith', 4),
(GETDATE(), 3.5, 'John Smith', 5),
(GETDATE(), 3.8, 'John Smith', 6);
insert into FYP values ('Time table scheduling using genetic algorithm', 'Artificial Intelligence', 'Dr.Which', 'B', 2);
insert into FYP values ('Sentiment Analysis', 'Natural Language Processing', 'Dr.Whom', 'A+', 3);
insert into FYP values ('Line Following Robot', 'Robotics','Dr.Why', 'B+', 4);
insert into FYP values ('Tumor Detection using OpenCV', 'Digital Image Prcoessing','Dr.What', 'B+', 5);
insert into FYP values ('Training Arena in Virtual Reality', 'AR/VR Technology', 'Dr.When', 'A', 6);
-- select* from Transcript
--SELECT s.Name AS 'StudentName', s.RollNumber AS 'RollNumber', s.Degree AS 'DegreeName',
--d.DateOfIssuance AS 'DateOfIssuance', d.GraduatingCGPA AS 'CGPA', d.Signature
--FROM Students s INNER JOIN Degree d ON s.UserID = d.UserID where s.UserID=2
--select* from Courses
--select* from StudentAcademicRecords
--SELECT
-- c.CourseID,
-- c.CourseName,
-- sar.RecordID,
-- sar.UserID,
-- c.Grade,
-- sar.CGPA,
-- sar.CreditHours
--FROM
-- Courses c
--INNER JOIN
-- StudentAcademicRecords sar ON c.RecordID = sar.RecordID
--WHERE
-- sar.UserID = 1; -- Change this to any specific UserID
--SELECT
-- s.Name AS 'StudentName',
-- s.RollNumber AS 'RollNumber',
-- c.CourseID,
-- c.CourseName,
-- c.Grade,
-- sar.CGPA,
-- sar.CreditHours,
-- SUM(sar.CreditHours) OVER() AS 'TotalCreditHours',
-- d.Signature
--FROM
-- Students s
--INNER JOIN
-- StudentAcademicRecords sar ON s.UserID = sar.UserID
--INNER JOIN
-- Courses c ON sar.RecordID = c.RecordID
--LEFT JOIN
-- Degree d ON s.UserID = d.UserID
--WHERE
-- s.UserID = 1
--ORDER BY
-- c.CourseID;
--select* from Courses
--select r.RecordID, r.UserID as 'Student ID', r.CGPA, r.CreditHours, c.CourseID, c.CourseName,
--c.Grade from StudentAcademicRecords r inner join Courses c on r.RecordID=c.RecordID where r.UserID=1
--SELECT
-- c.CourseID,
-- c.CourseName,
-- sar.RecordID,
-- sar.UserID,
-- c.Grade,
-- sar.CGPA,
-- sar.CreditHours
--FROM
-- Courses c
--INNER JOIN
-- StudentAcademicRecords sar ON c.RecordID = sar.RecordID
--WHERE
-- sar.UserID =1
-- SELECT Name, Address, DateOfJoining, DateOfRetirement FROM Directors
select* from Notifications