Question: Provide SQL query for the questions below: 1. Write and execute the SQL command to add a column for a math score to the student

Provide SQL query for the questions below:

1. Write and execute the SQL command to add a column for a math score to the student table. You do not need to add data.

2. Write and execute the SQL command to add a column for a subject to the t u t o r table. The only values allowed in this column will be Reading, Math, and ESL. You do not need to add data.

3. Which students have read scores above 3.5?

4. List the t u t o r s who have certification dates after March 2016 and are listed as Active.

5. If t u t o r s are paid $10 per hour, what is the total amount paid to each t u t o r per month, using the data from the tutor report? Make sure to sort your output by month, then by t u t o r_id.

6. What are the average, max, and min read scores for students?

7. List the t u t o r_id and student id who have been working together the longest amount of time.

8. Which t u t o r s have not yet submitted a report for MAR 2017?

9. List the June activity for all currently active students, including the number of hours they have received "tutoring" and the number of lessons covered.

10. Which t u t o r s need to be reminded to turn in reports?

*NOTE* I have to spell t u t o r with spaces in between because chegg doesn't allow me to spell them as usual without spaces.

------------------------------------------------------------------------------------------------

The text file:

create table t u t o r

(t u t o r_id number(3),

cert_date date,

status varchar2(20),

constraint pk_tutor primary key (t u t o r_id));

create table student

(student_id number(4),

read number(2,1),

constraint pk_student primary key (student_id));

create table match_history

(match_id number(3),

t u t o r_id number(3),

student_id number(4),

start_date date,

end_date date,

constraint pk_match_history primary key (match_id),

constraint fk1_match_history foreign key (t u t o r_id) references

t u t o r(t u t o r_id),

constraint fk2_match_history foreign key (student_id) references

student(student_id));

create table t u t o r_report

(match_id number(3),

month date,

hours number(3),

lessons number(3),

constraint pk_t u t o r_report primary key (match_id, month),

constraint fk1_t u t o r_report foreign key (match_id) references

match_history(match_id));

insert into t u t o r values (100, '05-JAN-2017', 'Active');

insert into t u t o r values (101, '05-JAN-2017', 'Temp Stop');

insert into t u t o r values (102, '05-JAN-2017', 'Dropped');

insert into t u t o r values (103, '22-MAY-2017', 'Active');

insert into t u t o r values (104, '22-MAY-2017', 'Active');

insert into t u t o r values (105, '22-MAY-2017', 'Temp Stop');

insert into t u t o r values (106, '22-MAY-2017', 'Active');

insert into student values (3000, 2.3);

insert into student values (3001, 5.6);

insert into student values (3002, 1.3);

insert into student values (3003, 3.3);

insert into student values (3004, 2.7);

insert into student values (3005, 4.8);

insert into student values (3006, 7.8);

insert into student values (3007, 1.5);

insert into match_history values (1, 100, 3000, '10-JAN-2017', null);

insert into match_history values (2, 101, 3001, '15-JAN-2017', '15-MAY-

2017');

insert into match_history values (3, 102, 3002, '10-FEB-2017', '01-MAR-

2017');

insert into match_history values (4, 106, 3003, '28-MAY-2017', null);

insert into match_history values (5, 103, 3004, '01-JUN-2017', '15-JUN-

2017');

insert into match_history values (6, 104, 3005, '01-JUN-2017', '28-JUN-

2017');

insert into match_history values (7, 104, 3006, '01-JUN-2017', null);

insert into t u t o r_report values (1, '01-JUN-2017', 8, 4);

insert into t u t o r_report values (4, '01-JUN-2017', 8, 6);

insert into t u t o r_report values (5, '01-JUN-2017', 4, 4);

insert into t u t o r_report values (4, '01-JUL-2017', 10, 5);

insert into t u t o r_report values (1, '01-JUL-2017', 4, 2);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!