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
studentid studentname studentadd studentgradelvl studentgpa studentdob studentphone
Alice Johnson Seminole Ct Freshman
Bob Smith Madison Ave. Sophomore
Ben Lopez Olive Ave. Junior
Lily Martinez Old Post Rd Senior
Ava Harris Easton Ave. Freshman
Daniel Wright W Shaw Rd Sophomore
Emily Davis Pembury Ln Junior
Carter Cooper S Pine St Senior
Logan Bennett Little St Freshman
Jack Ramirez N Ridge Rd Sophomore
Sophia Jenkins Caldweld St Junior
Samuel Turner W Main St Sophomore
Betty Draper Sardis Rd Freshman
Courses
courseid facultyid coursename semester credits coursefee
Mathematics Fall
English Composition Spring
History of Art Fall
Biology Fall
Physics Fall
Physical Education Summer
Intro to SQL Spring
Statistics Fall
Chemistry Spring
Painting Summer
Faculty
facultyid facultyname department startdate
Mrs Taylor Mathematics
Mrs Moore English
Mr Patel Science
Mr Jones Art & History
Mr Smith Physical Education
Mrs Miller Computer Science
Grades
studentid courseid finalgrade
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:
List all students along with their address, gpa, date of birth, and phone.
List all students and their phone numbers that are a sophomore.
List all students and their gpa that are currently either a freshman or a senior.
List all students that took a course along with their gpa, course name, and course fee Hint: Join tables Students,
Grades, and Courses
List all course id course name, semester, credits, and course fee in ascending order by course fee.
List all course id course name, semester, and credits for all courses that are in Fall and have a course fee of
greater than $
List all courses along with the name of the faculty member teaching it for courses worth more than credits.
List the number of students that have a gpa greater than or equal to but less than or equal to
List all students along with the number of courses they are taking. Set the new field as TotalCoursesHint: Use
Group By
List all students along with their phone numbers who are taught by faculty members that started in
List all students, final grades, course name, and faculty name.
List all students along with the average of the final grades they received this year. Round to one decimal place.
Example: Carter Cooper had final grades, and Average of his final grades rounded to one decimal
place should be
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
