-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview2.sql
More file actions
16 lines (15 loc) · 890 Bytes
/
view2.sql
File metadata and controls
16 lines (15 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- create a view to get all the students , their areas of study Concentration,
-- college under which they study or affliated to, Major or Minor Status, and their studentstatus
-- Run the below Query to drop the view
-- DROP VIEW StudentAreaOfConcentrationAndStatusInfo
-- Run the below Statement to Check the output
-- SELECT * FROM StudentAreaOfConcentrationAndStatusInfo
CREATE VIEW StudentAreaOfConcentrationAndStatusInfo AS
SELECT p.FirstName, p.LastName, ss.StudentStatus, Aos.StudyTitle, sas.IsMajor, c.CollegeName
FROM StudentInfo si,StudentStatus ss, StudentAreaOfStudy sas,
AreaOfStudy Aos, College c, People p
WHERE si.PersonID = p.PersonID AND
si.StudentStatusID = ss.StudentStatusID AND
sas.StudentID = si.StudentID AND
sas.AreaID = Aos.AreaOfStudyID AND
Aos.CollegeID = c.CollegeID