Question: use SQL commands to create a database named EduData which is composed of the following tables. Once completed, save the SQL script as a .

use SQL commands to create a database named EduData which is composed of the
following tables.
Once completed, save the SQL script as a .sql file.
TABLES: Students
student_id student_name student_add student_gradelvl student_gpa student_dob student_phone
850283175 Alice Johnson 1555 Seminole Ct. Freshman 3.742005-02-08704-552-1810
850295618 Bob Smith 878 Madison Ave. Sophomore 3.872004-06-03336-316-5434
850296174 Ben Lopez 4200 Olive Ave. Junior 4.002002-02-09803-432-6225
850295278 Lily Martinez 608 Old Post Rd. Senior 2.951999-10-08404-243-7379
850199374 Ava Harris 235 Easton Ave. Freshman 3.422001-07-18904-992-7234
850992648 Daniel Wright 2508 W. Shaw Rd. Sophomore 3.622004-02-22919-809-2545
850193625 Emily Davis 200 Pembury Ln. Junior 2.841999-04-21803-432-7600
850291764 Carter Cooper 4990 S. Pine St. Senior 3.482002-03-25919-355-0034
850199285 Logan Bennett 1200 Little St. Freshman 3.822005-04-25803-432-1987
850228498 Jack Ramirez 7822 N. Ridge Rd. Sophomore 3.552000-12-05904-725-4672
850002648 Sophia Jenkins 4090 Caldweld St. Junior 4.002003-04-25704-365-7655
850111258 Samuel Turner 3320 W. Main St. Sophomore 3.602001-09-14704-372-9000
850349264 Betty Draper 1600 Sardis Rd. Freshman 3.282002-01-08918-941-9121
Courses
course_id faculty_id course_name semester credits course_fee
1008501 Mathematics 101 Fall 355.50
2008502 English Composition Spring 380.00
3008504 History of Art Fall 390.00
3508503 Biology Fall 385.75
4008503 Physics Fall 450.50
5008505 Physical Education Summer 350.00
6008506 Intro to SQL Spring 5100.50
7008501 Statistics Fall 350.50
8008503 Chemistry Spring 350.75
8508504 Painting Summer 470.00
Faculty
faculty_id faculty_name department start_date
8501 Mrs. Taylor Mathematics 2018-10-28
8502 Mrs. Moore English 2013-11-03
8503 Mr. Patel Science 2021-11-14
8504 Mr. Jones Art & History 2017-11-20
8505 Mr. Smith Physical Education 2011-11-20
8506 Mrs. Miller Computer Science 2019-12-19
Grades
student_id course_id finalgrade
85029176440085
85019928560092
85019937470074
85000264830094
85028317585044
85011125820096
85019362510074
85029617485082
85019928540093
85034926480099
85029176485075
85011125860084
85034926410085
85029561850097
85099264860085
85022849820072
85099264870081
85028317530090
85019362570082
85000264820079
85029527860062
85029617440068
85029176460075
85022849880092
85029527835057
Second Section:
Using the database created in the last section, create SQL statements for the set of queries listed below.
Make sure you verify your sql statements work by executing them on workbench.
Once completed, put all statements in either a pdf or a sql text file.
Give the SQL commands necessary to perform the following queries:
1. List all students along with their address, gpa, date of birth, and phone.
2. List all students and their phone numbers that are a sophomore.
3. List all students and their gpa that are currently either a freshman or a senior.
4. List all students that took a course along with their gpa, course name, and course fee (Hint: Join tables Students,
Grades, and Courses)
5. List all course id, course name, semester, credits, and course fee in ascending order by course fee.
6. List all course id, course name, semester, and credits for all courses that are in Fall and have a course fee of
greater than $70.
7. List all courses along with the name of the faculty member teaching it for courses worth more than 3 credits.
8. List the number of students that have a gpa greater than or equal to 3.8 but less than or equal to 4.
9. List all students along with the number of courses they are taking. Set the new field as TotalCourses.(Hint: Use
Group By)
10. List all students along with their phone numbers who are taught by faculty members that started in 2019.
11. List all students, final grades, course name, and faculty name.
12. List all students along with the average of the final grades they received this year. Round to one decimal place.
(Example: Carter Cooper had 3 final grades, 85,75, and 75. Average of his final grades rounded to one decimal
place should be 78.3)
13. List all students along with course names and final grades received in courses taught by Mr. Patel.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!