QuestionSQL exercise Exercise 1 Create SQL code to display all fields...SQL exerciseExercise 1 Create SQL code to display all fields from the students table. Include only students whose major is Finance ('FIN') and who have an in-state residence. Sort it alphabetically by student first name.How many rows did your query return? Paste/Enter SQL Code here, making sure the entire SQL code is viewable> Paste Screenshot here, making sure the entire screenshot is viewable>Exercise 2 Write SQL which will give us the course id number (idCourse field), course description, the number of units, the offering term, whether it's online or in person, and the capacity. Include only those courses which are more than 3 units and have a capacity of less than 40 students. Sort it ascending by idCourse.How many rows did your query return?Paste/Enter SQL Code here, making sure the entire SQL code is viewable> Paste Screenshot here, making sure the entire screenshot is viewable>Exercise 3 Some faculty are grumbling that certain professors have an easy teaching load, defined as only a few courses with low capacity, while others have a heavy load of many courses with high seat counts. Run a query to help answer this question. Your output should contain the faculty ID, faculty name (first and last - it's fine to have this as two separate fields, also fine to concatenate together), the largest capacity class the faculty member is assigned to teach, the maximum possible total student load (sum of all the course capacities), and the number of classes the faculty member is teaching.Include all faculty members, even if they are not assigned to teach any courses. Include courses only if they are taught by a faculty member. Sort your output ascending by the number of courses taught, with the professors with the fewest courses at the top.Image transcription textFor example, if you had the followinginput data (the blank row at the bottommeans Professor Poldark... Show moreImage transcription textYour desired out- put would besomething like this: Faculty ID FacultyName Max capacity Sum... Show moreHow many rows did your query return?Paste/Enter SQL Code here, making sure the entire SQL code is viewable> Paste Screenshot here, making sure the entire screenshot is viewable>Exercise 4 You want to see how your various students are doing, GPA-wise. Create a report which will give the student's last name, student's first name (should be concatenated into a single field as in the example), the student's major, and the student's average GPA. Include only students who have actually taken at least one class (if they took it and earned 0 GPA points indicating they failed it, that record should be included.) Do not include a student who has not taken any classes. The average GPA is the average of the GPA Points column in the enrollment table; display this to four or more decimal places. Sort alphabetically by "Last, First" name combination.Paste a screen shot of successful execution below. Be sure your screenshots show all the SQL you use; you are welcome to include several screen shots if necessary. For example, if your input data is like this: (note the in the last row - indicates student Tyrone Brown is new and has not taken any classes yet, has only declared a major.)Image transcription textGPA First Name Last Name MajorSemester Class Points AriannaHuffington LSA Fall Art H... Show moreImage transcription textYour results should look something likethis: Student Name Major Average GPALee, Charles IS Lee, Deni... Show moreHow many rows did your query return?Paste/Enter SQL Code here, making sure the entire SQL code is viewable> Paste Screenshot here, making sure the entire screenshot is viewable>Exercise 5 Professor Victoria Emmerline is set to retire immediately before spring semester. You want to generate a list of all students who are currently enrolled in any class she is teaching this spring, so you can reach out to them and let them know there will be a different professor. Assume each class she teaches could be assigned to a different professor - i.e. if Professor Emmerline was set to teach Calculus I and Calculus II, it's possible Calculus I will be assigned to Professor X and Calculus II will be assigned to Professor Y.Generate SQL code to make a report which will do the following· Generate a concatenated class name/number string, such as "FIN 200" from something in the Finance Department where the course number is 200· Print that class name/number string in the first column of your report· Print the class description (such as "Introduction to Finance")· List the student's first name and then last name· List the offering term and the format (online or in person)· List the professor's first name and last name· Sort your output ascending by the class name/number string, so "FIN 200", "FIN 120" and "ART 100" would be sorted in the following order: "ART 100", "FIN 120", "FIN 200."· Within the same class, further sort your output so it's alphabetical by student last name, student first nameHow many rows did your query return?Paste/Enter SQL Code here, making sure the entire SQL code is viewable>Paste Screenshot here, making sure the entire screenshot is viewable>Exercise 6 Start with the same problem statement as in Problem 5, except this time generate a summary report. For each course name, list the count of the students who will need to be contacted for each format. Sort your report so it's alphabetically sorted on Course Name, then by format (online or in person). A sample output is below (your data may vary.)Paste a screen shot of successful execution below. Be sure your screenshots show all the SQL you use; you are welcome to include several screen shots if necessary.Image transcription textProfessor (ok to Course Name CourseDescription How many stu-concatenate; also Format... Show moreHow many rows did your query return?Paste/Enter SQL Code here, making sure the entire SQL code is viewable>Paste Screenshot here, making sure the entire screenshot is viewable>DROP TABLE IF EXISTS Student ;CREATE TABLE IF NOT EXISTS Student ( idStudent INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, stdFirstName TEXT NULL DEFAULT NULL, stdLastName TEXT NULL DEFAULT NULL, stdMajor TEXT NULL DEFAULT NULL, stdStanding TEXT NULL DEFAULT NULL, stdResidence TEXT NULL DEFAULT NULL);DROP TABLE IF EXISTS Faculty ;CREATE TABLE IF NOT EXISTS Faculty ( idFaculty INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, FacFirstName TEXT NULL DEFAULT NULL, FacLastName TEXT NULL DEFAULT NULL, FacRank TEXT NULL DEFAULT NULL, FacStartDate TEXT NULL);DROP TABLE IF EXISTS Course ;CREATE TABLE IF NOT EXISTS Course ( idCourse INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, CourseDept TEXT NULL DEFAULT NULL, CourseNumber INTEGER NULL, CourseDesc TEXT NULL DEFAULT NULL, CourseUnits INTEGER NULL);DROP TABLE IF EXISTS Offering ;CREATE TABLE IF NOT EXISTS Offering ( idOffering INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, OffTerm TEXT NULL DEFAULT NULL, Format TEXT NULL DEFAULT NULL, Capacity INTEGER NULL, Course_idCourse INTEGER NOT NULL, Faculty_idFaculty INTEGER NOT NULL );DROP TABLE IF EXISTS Enrollment ;CREATE TABLE IF NOT EXISTS Enrollment ( idEnrollment INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, LetterGrade TEXT NULL, GPAPoints INTEGER NULL, Student_idStudent INTEGER NOT NULL, Offering_idOffering INTEGER NOT NULL );INSERT INTO Course (CourseDept, CourseNumber, CourseDesc, CourseUnits) VALUES ('FIN', '760', 'Derivatives', '3'),('DAT', '480', 'Visualization', '3'),('ART', '560','Renaissance','2'),('ENG', '240','Short Stories','3'),('IS', '120','Database Fundamentals','1'),('IS', '420','Distributed Databases','4'),('IS', '650','Cybersecurity','4'),('FIN', '700','Bond Valuation','4'),('DAT', '460','Cryptocurrency','3'),('ART', '250','Graphic Design','3'),('DAT', '515','Data Mining','4');INSERT INTO Faculty (FacFirstName, FacLastName, FacRank, FacStartDate) VALUES ('Victoria','Emmerline','Prof','1994-06-01'),('Greg','Brown','Prof','2010-09-01'),('Ed','Smith','Prof','1998-01-01'),('Tracey','Winter','Prof','2002-03-01'),('Taylor','Languid','Asst','2010-01-01'),('Kimberly','Smathers','Asst','2011-03-01'),('Lee','Marshall','Asst','2009-06-01'),('Rajean','Jackson','Asst','2014-09-01'),('Lee','Sepulveda','Assc','2018-01-01'),('Sylvester','Jackson','Assc','2015-09-01'),('Laura','Smith','Assc','2015-03-01'),('Colin','Ensenada','Assc','2015-01-01'),('Jackson','Nelson','Assc','2017-03-01');INSERT INTO Student (stdFirstName, stdLastName, stdMajor, stdStanding, stdResidence) VALUES ('Jordan','Adams','FIN','SO','Out of state'),('Hailey','Alexander','IS','JR','In state'),('Iris','Allen','DATA','SR','In state'),('Leo','Allen','FIN','SR','In state'),('Cameron','Anderson','DATA','FR','Out of state'),('Wyatt','Anderson','FIN','JR','In state'),('Zion','Bailey','FIN','FR','In state'),('Joseph','Baker','FIN','FR','In state'),('Abigail','Barnes','LSA','SR','Out of state'),('William','Bell','IS','SR','Out of state'),('Adalyn','Bennett','FIN','JR','In state'),('Lily','Brooks','DATA','SO','Out of state'),('Angel','Brown','IS','JR','In state'),('Mateo','Brown','IS','SR','In state'),('Kinsley','Bryant','LSA','JR','In state'),('Hannah','Butler','IS','JR','In state'),('Madison','Campbell','IS','SR','In state'),('Justin','Carter','FIN','SR','In state'),('Gabriel','Clark','DATA','SR','Out of state'),('Josiah','Clark','DATA','FR','In state'),('Penelope','Cole','LSA','FR','In state'),('Avery','Coleman','IS','SR','In state'),('Michael','Collins','IS','FR','In state'),('Trinity','Cook','FIN','SO','In state'),('Emma','Cooper','FIN','SO','In state'),('Isabella','Cox','FIN','SR','In state'),('Michael','Cruz','DATA','SO','In state'),('Aniyah','Davis','DATA','SO','In state'),('Caleb','Davis','DATA','SO','In state'),('William','Bell','UNK','FR','In state'),('Matthew','Edwards','DATA','SR','In state'),('Ethan','Ellis','FIN','JR','Out of state'),('Malik','Evans','FIN','SO','In state'),('Oliver','Fisher','FIN','SO','In state'),('Arianna','Flores','LSA','JR','In state'),('Anna','Ford','DATA','FR','In state'),('Ellie','Foster','LSA','SR','In state'),('James','Freeman','IS','SO','Out of state'),('Diamond','Garcia','UNK','FR','In state'),('Levi','Garcia','FIN','SO','In state'),('Muhammad','Gibson','DATA','SR','In state'),('Jacob','Gomez','FIN','SO','Out of state'),('Kaylee','Gonzales','FIN','FR','In state'),('Joshua','Gonzalez','LSA','JR','In state'),('Brooklyn','Graham','FIN','SO','In state'),('Amelia','Gray','IS','JR','In state'),('Jordan','Green','IS','JR','In state'),('Paisley','Griffin','FIN','SO','In state'),('Isaiah','Hall','LSA','FR','In state'),('Nathan','Hall','LSA','SO','Out of state'),('Sarah','Hamilton','IS','SR','In state'),('Daniel','Harris','DATA','JR','In state'),('Isaiah','Harris','DATA','SR','In state'),('Jayden','Harrison','LSA','FR','In state'),('Addison','Hayes','DATA','FR','In state'),('Aaliyah','Henderson','LSA','SO','Out of state'),('James','Hernandez','LSA','FR','In state'),('Jaylen','Hill','LSA','SR','In state'),('Mia','Howard','LSA','SO','In state'),('Camilla','Hughes','LSA','SR','In state'),('Christian','Jackson','FIN','SR','Out of state'),('Connor','Jackson','FIN','FR','In state'),('Charlotte','James','FIN','FR','In state'),('Ella','Jenkins','DATA','SO','In state'),('Alexandra','Johnson','IS','JR','Out of state'),('Matthew','Johnson','FIN','SR','In state'),('Alyssa','Jones','LSA','SO','In state'),('Jayce','Jones','FIN','FR','In state'),('Mason','Jordan','FIN','JR','Out of state'),('Chloe','Kelly','DATA','SR','In state'),('Jasmine','King','LSA','SR','Out of state'),('Hannah','Lee','FIN','JR','In state'),('Samuel','Lee','IS','SR','Out of state'),('Dylan','Lewis','FIN','SO','In state'),('Hailey','Lewis','IS','SR','In state'),('Mila','Long','LSA','SO','In state'),('Jayla','Lopez','FIN','FR','In state'),('Sebastian','Marshall','IS','SO','In state'),('David','Martin','UNK','FR','In state'),('Isaac','Martin','DATA','JR','In state'),('Cameron','Martinez','LSA','JR','In state'),('Elijah','Martinez','IS','FR','In state'),('Carter','Mcdonald','LSA','FR','In state'),('Anthony','Miller','FIN','JR','In state'),('Luke','Miller','LSA','SO','In state'),('Kayla','Mitchell','IS','FR','In state'),('Brianna','Moore','IS','JR','Out of state'),('Jack','Moore','UNK','FR','In state'),('Tyler','Morgan','FIN','SR','In state'),('Sydney','Morris','LSA','SR','In state'),('Xavier','Murphy','IS','FR','In state'),('Benjamin','Murray','FIN','SR','Out of state'),('Isabelle','Myers','IS','SO','In state'),('Josiah','Nelson','DATA','SR','In state'),('Alexander','Ortiz','DATA','SR','In state'),('Elijah','Owens','FIN','SR','In state'),('Makayla','Parker','LSA','JR','In state'),('Nora','Patterson','IS','FR','Out of state'),('Kennedy','Perez','LSA','FR','In state'),('Scarlett','Perry','LSA','FR','In state'),('Zoe','Peterson','LSA','SR','In state'),('Laila','Phillips','DATA','SO','In state'),('Maya','Powell','IS','SR','Out of state'),('Evelyn','Price','DATA','SO','Out of state'),('Layla','Ramirez','LSA','SO','In state'),('Tiana','Reed','LSA','JR','In state'),('Logan','Reynolds','LSA','JR','In state'),('Ava','Richardson','DATA','SO','In state'),('Olivia','Rivera','DATA','SR','In state'),('Kevin','Roberts','UNK','FR','In state'),('Ethan','Robinson','LSA','SR','Out of state'),('Nicholas','Robinson','LSA','JR','In state'),('Gabrielle','Rodriguez','DATA','SO','Out of state'),('Lincoln','Rodriguez','DATA','JR','In state'),('Taylor','Rogers','IS','SO','In state'),('Madison','Ross','UNK','FR','In state'),('Madelyn','Russell','IS','SR','In state'),('Neve','Sanchez','LSA','SR','In state'),('Harper','Sanders','LSA','SR','In state'),('Jeremiah','Scott','IS','SR','In state'),('Leah','Simmons','LSA','FR','Out of state'),('Aliyah','Smith','LSA','SR','In state'),('Ryan','Smith','DATA','FR','In state'),('Nathan','Stewart','LSA','JR','Out of state'),('Mackenzie','Sullivan','DATA','SO','In state'),('Caleb','Taylor','UNK','FR','In state'),('William','Taylor','IS','SR','In state'),('Chloe','Thomas','FIN','SO','In state'),('Gabriel','Thomas','LSA','SR','Out of state'),('Destiny','Thompson','DATA','SR','Out of state'),('Owen','Thompson','DATA','SR','In state'),('Riley','Torres','FIN','JR','In state'),('Kiara','Turner','DATA','SR','Out of state'),('Imani','Walker','LSA','JR','In state'),('John','Walker','FIN','SO','In state'),('Victoria','Wallace','IS','SO','In state'),('Aria','Ward','FIN','SO','In state'),('Eliana','Washington','IS','SR','In state'),('Aubrey','Watson','IS','SR','In state'),('Grace','West','IS','SR','In state'),('Christopher','White','LSA','JR','In state'),('Henry','White','UNK','FR','In state'),('Alexis','Williams','FIN','FR','In state'),('Daniel','Williams','FIN','SO','Out of state'),('Brandon','Wilson','DATA','SR','Out of state'),('Julian','Wilson','IS','SR','In state'),('Emily','Wood','FIN','JR','In state'),('Luna','Woods','IS','JR','In state'),('Jayden','Wright','IS','FR','Out of state'),('Jada','Young','DATA','JR','In state');INSERT INTO Offering (OffTerm, Format, Capacity, Course_idCourse, Faculty_idFaculty) VALUES ('Spring','Online','30','10','13'),('Fall','Online','30','1','3'),('Spring','Online','50','11','12'),('Summer','Online','20','10','1'),('Spring','In person','20','10','1'),('Spring','Online','20','8','11'),('Summer','Online','30','1','11'),('Summer','Online','30','11','6'),('Spring','Online','40','7','9'),('Spring','Online','20','11','6'),('Summer','Online','40','9','6'),('Fall','In person','50','1','11'),('Spring','Online','40','11','12'),('Spring','Online','40','11','6'),('Fall','Online','40','6','5'),('Spring','In person','20','11','6'),('Fall','Online','50','9','12'),('Fall','Online','20','4','10'),('Fall','In person','30','5','5'),('Fall','In person','50','3','13'),('Fall','Online','30','5','5'),('Spring','Online','30','6','9'),('Spring','In person','40','6','9'),('Spring','Online','50','7','5'),('Fall','Online','40','6','9'),('Fall','Online','20','7','9'),('Spring','Online','50','10','1'),('Fall','In person','40','8','11'),('Fall','Online','40','11','12'),('Spring','Online','40','1','3'),('Summer','Online','40','3','1'),('Fall','Online','50','6','5'),('Summer','In person','20','2','6'),('Fall','In person','50','9','6'),('Spring','Online','20','3','1'),('Spring','Online','20','10','1'),('Fall','In person','20','7','5'),('Fall','In person','40','5','5'),('Fall','In person','40','2','2'),('Fall','Online','20','3','13'),('Fall','Online','30','9','2'),('Summer','In person','30','1','3'),('Spring','In person','50','7','9'),('Summer','Online','50','7','9'),('Spring','In person','40','3','1'),('Fall','In person','30','3','13'),('Fall','Online','20','2','6'),('Spring','In person','30','3','13'),('Fall','In person','20','1','4'),('Spring','Online','40','2','6'),('Summer','In person','50','6','5'),('Summer','Online','20','10','1'),('Summer','In person','30','9','2'),('Spring','Online','20','3','1'),('Spring','In person','20','9','2'),('Fall','Online','40','10','13'),('Fall','In person','20','5','5'),('Fall','Online','20','10','1'),('Spring','In person','30','9','2'),('Spring','In person','30','7','9');INSERT INTO Enrollment (LetterGrade, GPAPoints, Student_idStudent, Offering_idOffering) VALUES('B','3','111','32'),('B','3','73','7'),('C','2','119','36'),('B','3','28','51'),('B','3','22','45'),('C','2','58','5'),('C','2','5','49'),('B','3','20','27'),('B','3','100','28'),('A','4','136','35'),('A','4','62','36'),('B','3','117','29'),('B','3','128','37'),('C','2','51','6'),('B','3','59','16'),('C','2','80','43'),('B','3','1','31'),('F','0','20','15'),('B','3','134','38'),('B','3','8','18'),('C','2','37','16'),('A','4','10','8'),('A','4','85','6'),('A','4','145','1'),('A','4','119','51'),('F','0','118','20'),('A','4','59','34'),('C','2','96','51'),('C','2','8','46'),('B','3','2','37'),('D','1','29','10'),('B','3','142','9'),('A','4','40','44'),('B','3','111','12'),('B','3','35','56'),('A','4','13','12'),('B','3','129','14'),('A','4','5','51'),('B','3','92','47'),('B','3','106','14'),('B','3','92','60'),('C','2','2','6'),('B','3','22','1'),('C','2','113','50'),('A','4','10','49'),('D','1','109','23'),('B','3','79','33'),('B','3','75','10'),('B','3','92','25'),('A','4','79','14'),('C','2','45','59'),('C','2','32','31'),('A','4','111','6'),('B','3','64','44'),('B','3','56','51'),('C','2','126','43'),('B','3','94','60'),('A','4','33','49'),('D','1','51','27'),('A','4','10','7'),('B','3','139','59'),('C','2','108','51'),('A','4','96','14'),('F','0','44','8'),('C','2','39','9'),('A','4','91','40'),('B','3','35','47'),('A','4','69','7'),('A','4','10','9'),('B','3','51','34'),('B','3','59','2'),('A','4','33','8'),('A','4','15','4'),('B','3','150','10'),('D','1','83','46'),('B','3','45','55'),('A','4','1','20'),('B','3','42','16'),('B','3','110','58'),('A','4','57','13'),('B','3','98','27'),('B','3','70','38'),('B','3','70','36'),('A','4','78','8'),('A','4','75','31'),('C','2','6','40'),('B','3','117','34'),('B','3','133','21'),('B','3','59','58'),('F','0','130','47'),('B','3','2','19'),('B','3','131','14'),('B','3','79','5'),('B','3','10','8'),('A','4','4','14'),('F','0','122','60'),('F','0','84','2'),('B','3','31','42'),('A','4','111','10'),('A','4','11','36'),('B','3','42','1'),('A','4','26','45'),('A','4','124','5'),('A','4','77','16'),('A','4','120','18'),('D','1','127','39'),('A','4','129','9'),('B','3','29','28'),('A','4','150','19'),('C','2','7','35'),('C','2','70','57'),('F','0','113','31'),('A','4','47','46'),('B','3','118','51'),('C','2','15','57'),('A','4','77','45'),('B','3','33','55'),('B','3','103','7'),('A','4','128','44'),('B','3','86','49'),('B','3','132','3'),('B','3','55','35'),('B','3','65','33'),('B','3','37','55'),('B','3','143','40'),('A','4','96','20'),('A','4','116','38'),('B','3','98','12'),('B','3','72','43'),('C','2','39','27'),('C','2','114','19'),('C','2','71','57'),('B','3','70','9'),('B','3','146','54'),('F','0','30','38'),('B','3','69','10'),('C','2','120','25'),('A','4','131','34'),('F','0','135','8'),('B','3','45','24'),('C','2','14','38'),('B','3','114','34'),('D','1','32','3'),('B','3','101','17'),('D','1','59','6'),('C','2','83','15'),('A','4','99','12'),('B','3','115','5'),('C','2','61','56'),('C','2','45','1')