Insert 5 additional rows into the Student and Section Table – the values here ca
ID: 3913183 • Letter: I
Question
Insert 5 additional rows into the Student and Section Table – the values here can be of your design. At this time there are no keys so you can reuse ID numbers if you’d like.
Perform Basic Profiling of your data & Submit via BlackboardEach Table
Count of values in each of the ID fields
Count of Distinct values in each of the ID fields
Each Column
Check to see whether or not there are Null values in the columns (hint you will need to use a where clause like where column_name is null)
Student Table
Count of Distinct First Names
Count of Distinct Last Names
Count of Distinct Advisors
Count of students per Major
Enrollment Table
Count of Students by Grade
Course Table
Count of Courses Offered by Department
Number of Majors
Count of Majors Offered
Number of Faculty
Count of Distinct First Names
Count of Distinct Last Names
Count of Faculty per job
Explanation / Answer
CREATE DATABASE university;
CREATE TABLE student (
Count_of_distinct_first_names INT NOT NULL,
Count_of_distinct_last_names INT NOT NULL,
Count_of_distinct_advisor INT NOT NULL,
Count_of_students_per_major INT NOT NULL,
);
INSERT INTO student
(Count_of_distinct_first_names, Count_of_distinct_last_names, Count_of_distinct_advisor, Count_of_students_per_major)
VALUES
(50, 50, 5, 25);
CREATE TABLE enrollment
(count_of_student_by_grade INT NOT NULL);
INSERT INTO enrollment
(count_of_student_by_grade)
VALUES (50);
CREATE TABLE course
(
Count_of_Courses_Offered_by_Department INT NOT NULL,
Number_of_Majors INT NOT NULL,
Count_of_Majors_Offered INT NOT NULL,
Number_of_Faculty INT NOT NULL,
Count_of_Distinct_First_Names INT NOT NULL,
Count_of_Distinct_Last_Names INT NOT NULL,
Count_of_Faculty_per_job INT NOT NULL,
);
INSERT INTO course
(
Count_of_Courses_Offered_by_Department,
Number_of_Majors,
Count_of_Majors_Offered,
Number_of_Faculty,
Count_of_Distinct_First_Names,
Count_of_Distinct_Last_Names,
Count_of_Faculty_per_job,
)
VALUES
(10, 20, 15, 12, 50, 50, 12);
SELECT COUNT (*) AS numbers_of_faculty FROM course; / use this query to count totals.