Write a correct SQL statement for each problem and show the result of the statement. Use...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
3. The following three processes all expand gases in a piston/cylinder system initially at 1000 kPa, 1 m to 200 kPa. Find the amount of boundary work transferred from the system to the environment...
-
This assignment requires you to complete the 2022 tax reporting for a fictional woman named Anna Smith. Question 1 T1 - step 4 - line 66 This is Anna's taxable income Answer: Question 2 T1 - step...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Papas Fried Chicken bought equipment on January 2, 2013, for $ 39,000. The equipment was expected to remain in service for four years and to perform 11,000 fry jobs. At the end of the equipments...
-
Write equations for the synthesis of the following ethers by the Williamson method: a. b. (CH3)3COCH3 c. C6H5CH2OC(CH3)3 OCH3
-
F15 sure 1 A portfolio consists of only the market portfolio (with an expected return of 16.2% and a standard deviation of 15.2%) and the risk-free asset. The risk-free rate is 4.5%. If the target...
-
Earnings management may be used to avoid a technical default of a covenant under a loan agreement. Loan covenants are written into loan agreements in order to protect a lender from various actions...
-
Use Problem 11-14 and 11-15 to prepare an activity statement (operating statement), a comparative statement of financial position (balance sheet), and a statement of cash flows (using the indirect...
-
The balance sheet and dicture of significant accounting policies aan om the January 31, 20 incorporated appear below. Use this information to answer the wing other long-te Accents payable long-tas...
-
Dorothy is considering a new part-time business venture where she would monogram linens and other items. To do this, she would need to upgrade her current sewing machine. Here is what she quickly...
-
A person is taking a 9-question multiple-choice test for which each question has three answer choices, only one of which is correct. The person decides on answers by rolling a fair die and marking...
-
A disoriented physics professor drives 3.18 km north, then 4.72 km west, and then 1.61 km south. Find the magnitude of the resultant displacement of this professor. Express your answer in kilometers....
-
GAZ COMPANY PAID DIVIDENDS LAST 4 YEARS AS FOLLOWS DIVIDENDS 2.4 2.5 2 2 YEAR 2000 2001 2002 2003 THIS YEAR THE DIVIDENDS IS 4.5 AND WILL GROW AT A CONSTANT RATE WHAT IS THE PRICE OF THE STOCK IF THE...
-
MPI Incorporated has $12 billion in assets, and its tax rate is 25%. Its basic earning power (BEP) ratio is 9%, and its return on assets (ROA) is 3%. What is MPI's times-interest-earned (TIE) ratio?...
-
Determine the net torque on the 6.0-m-long uniform beam shown in the figure (Figure 1). Figure 65 N 45 P 56 N 30 60 52 N < 1 of 1 Part B Calculate about point P at one end. Express your answer using...
-
5. Selected financial data for Amberjack Corporation follows. ($ thousands) Year 1 Year 2 Sales 271,161 457,977 Cost of goods sold 249,181 341,204 Net income (155,034) (403,509) Cash flow from...
-
The goal is to analyze a dummy balance sheet, income statement, and statement of cash flows and make adjustments for missing/altered transactions. It's not just about the basic journal entries but...
-
Assume a simple Keynesian depression economy with a multiplier of 4 and an initial equilibrium income of $3,000. Saving and investment equal $400, and assume full employment income is $4,000. a. What...
-
Show that the label changing algorithm must produce an equality subgraph that has a complete matching, by arguing as follows: (a) Upon changing labeling, since by claim (5) there is a new edge from...
-
A company is planning to locate five branches in five states. After studying various factors related to the local economies and tax laws of the states, the company has managed to quantify how...
-
Find a maximal matching for the graph of Exercise 8.
Study smarter with the SolutionInn App