Question: SQL Assignment Table: student _ info Table: course _ infoQuestions: Create the student _ course _ enrollment table using SQL . ( 1 . 0
SQL Assignment
Table: studentinfo
Table: courseinfoQuestions:
Create the studentcourseenrollment table using
SQL
Marks
Insert the studentcourseenrollment data from the above
picture.
Marks
Retrieve the names and ages of students majoring in "Biology"
Marks
Calculate the average age of students majoring in
"Physics"
Marks
Retrieve the unique names of the courses from the courseinfo
table
Marks
Instructions:
Go to
https:sqliteonlinecom and connect MS SQL to start writing
queries.
File Format:
You must have to include the SQL Query and Output of that query
Like this format.
SQLASSIGNMENTQUERY.SQL File with Question
Number, Query and Query Output
Screenshot of the Query and Output in Word Document
Table: studentcourseenrollment
The creation of the studentinfo and courseinfo tables, along with the
data insertion queries, can be found in the attached SQL file named
studentandcoursetablecreateanddatainsert.sql or in the code
snapshot.
Create the studentinfo table
CREATE TABLE studentinfo
StudentID INT PRIMARY KEY,
Name VARCHAR
Age INT,
Major VARCHAR
;
Insert data into the studentinfo table
INSERT INTO studentinfo StudentID Name, Age, Major
VALUES
'Alice', 'Biology'
'Bob', 'History'
'Carol', 'Math'
'David', 'Physics'
'Emily', 'Biology'
'Frank', 'Physics';
Create the courseinfo table
CREATE TABLE courseinfo
CourseID INT PRIMARY KEY,
CourseName VARCHAR
Instructor VARCHAR
;
Insert data into the courseinfo table
INSERT INTO courseinfo CourseID CourseName, Instructor
VALUES
'Biology Dr Smith'
'History 'Prof. White'
'Math 'Prof. Green'
'Physics Dr Brown';
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
