Question
How do I write the following SQL scripts using functions for the following table? Who has the highest scholarship amount? Average scholarship amount? The total
How do I write the following SQL scripts using functions for the following table?
Who has the highest scholarship amount? Average scholarship amount? The total scholarship amount for all students 4 years of college? SAT score split in half to get the reading/writing and math score?
CREATE TABLE STUDENT_ATHLETES ( STUDENT_ID NUMBER (10) NOT NULL PRIMARY KEY, FIRST_NAME VARCHAR2(25) NOT NULL, LAST_NAME VARCHAR2(25) NOT NULL, BIRTH_DATE DATE, SPORT VARCHAR2 NOT NULL, SCHOLARSHIP_AMOUNT NUMBER(8,2) NOT NULL, MAJOR VARCHAR2(45) NOT NULL, GRAD_DATE DATE, SAT_SCORE NUMBER (4) NOT NULL );
INSERT INTO STUDENT_ATHLETES VALUES(1001,'Tom','Williams','12 Jan 1998','Tennis',2500.00,'Business','1 Jun 2021',1000);
INSERT INTO STUDENT_ATHLETES VALUES(1501,'John','Washington','14 Jan 1997','Bowling',1500.00,'Business','1 Jun 2021',926);
INSERT INTO STUDENT_ATHLETES VALUES(2012,'Sue','Thomas','22 Mar 2000','Cross Country',5000.00,'Communications','1 Jun 2021',1028);
INSERT INTO STUDENT_ATHLETES VALUES(3051,'Emily',Smith','25 Dec 2000','Basketball',50000.00,'Pre Med','1 Jun 2021',1300);
INSERT INTO STUDENT_ATHLETES VALUES(6079,'James','Cox','2 Jul 2000','Basketball',150000.00,'Political Science','1 Jun 2021',1200);
INSERT INTO STUDENT_ATHLETES VALUES(9788,'Michael','Vick','17 Jun 2000','Football',250000.00,'Computer Science','1 Jun 2021',1400);
INSERT INTO STUDENT_ATHLETES VALUES(4567,'Vince','Lambert','14 Feb 2000','Basketball',175000.00,'Teaching','1 Jun 2021',1376);
INSERT INTO STUDENT_ATHLETES VALUES(1234,'Carl','Lewis','31 Jan 2000','Track',25000.00,'Marketing','1 Jun 2021',998);
INSERT INTO STUDENT_ATHLETES VALUES(7890,'Patrick','Johnson','5 Aug 2000','Football',275000.00,'History','1 Jun 2021',1500);
INSERT INTO STUDENT_ATHLETES VALUES(3518,'Michael','Dumbroski','27 Sep 2000','Hockey',65000.00,'Engineering','1 Jun 2021',1212);
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