Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create the two tables for SQL and answer the questions below SQL Queries 1 . Courses ( Courses ) course _ id ( INT PRIMARY
Create the two tables for SQL and answer the questions below SQL Queries
Courses Courses
courseid INT PRIMARY KEY: Unique identifier for each course
coursename VARCHAR: Name of the course
departmentid INT: Foreign key referencing the departmentid in the
Departments table not provided
credits INT: Number of credits for the course
Enrollments Enrollments
enrollmentid INT PRIMARY KEY: Unique identifier for each enrollment
studentid INT: Foreign key referencing the studentid in the Students table not
provided
courseid INT: Foreign key referencing the courseid in the Courses table
semester VARCHAR: Semester the course was enrolled in eg Fall
Spring
grade CHAR: Letter grade earned in the course eg A B C F
Answer the following questions using SQL queries.
List all course names and their corresponding credit values.
Find the total number of courses offered by the university.
Retrieve the names of all courses with or more credits.
List the first course names
Find the total number of courses with exactly credits.
Retrieve all courses offered in the Fall semester.
List all student IDs enrolled in the university.
Retrieve all courses with a course name starting with "Introduction tocase
sensitiveHint: Use LIKE operator.
List all courses offered by the department number
Find the list of course courseid number of students studentid during the
Fall semester who got A in the course. Hint: use count and group by
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started