Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a correct SQL statement for each problem and show the result of the statement. Use the tables below. You may use SQL developer
Write a correct SQL statement for each problem and show the result of the statement. Use the tables below. You may use SQL developer to help you with answering the questions. Copy and past the source code and the result after each question. Student Student Studentld StudName Age Enrollment Enrollmentld EnrollmentDate Studentld A Mark 18 E100 Oct 10 2015 A Subild 1 B Matthew 17 E101 Oct 11 2015 B C Ruth 20 E102 Nov 10 2015 23 2 D John 15 E103 Dec 15 2015 D 1 E104 Feb-1-2015 E 3 E Sally 18 E105 Mar 10 2015 F 2 F James 17 Subject Subild SubjDescription Units Priceperunit 1 Math 3 400 2 Science 2 500 3 History 1 250 1.) Create an SQL statement that would show the minimum and maximum units of a subject. 2.) Create an SQL statement that would show the student name, enrollment date and subject description of the student who is enrolled in Math or Science. 3.) Create a view, name it as EnrollDates, that would show all the enrollment dates of students who are enrolled in the subject History. 4.) Create a view name it as student Details, that would should show the student name, enrollment date the total price per unit and subject description of students who are enrolled on the subject Science or History. 5.) Create a view, name it as Biggest Price, that will show the subject id and highest total price per unit of all the subjects. The view should show only the highest total price per unit that are greater than 1000.
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