Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

These statements are not working in Oracle SQL Developer mySQL Write 1 0 SQL statements against the STUDENT schema. Your statements should run error -

These statements are not working in Oracle SQL Developer mySQL
Write 10 SQL statements against the STUDENT schema. Your statements should run error-free and should be valid. Submit two separate files: one plain text file (.txt or .sql file) with your statements only (non-code should be properly commented); and the other document (doc/docx/pdf) include both your statements and your query results (copy and paste text or screen shots). The instructor should be able to run your plain text source file as script and generate the same output as shown in your result document.
Q1. Show all students who has a registration date of 1/25/2007. Display salutation, first name inital, and full last name in all upper cases in one column labeld "Student List". (HINT: use functions such as UPPER and SUBSTR)
Sample Result:
Student List
Mr. R SHI
Ms. H LOPEZ
Q2. Display the number of students who live on the 40th St in Brooklyn, NY.(HINT: use the COUNT function and join table STUDENT with ZIPCODE)
Q3. Show section information for all Programming related courses (description has "Programming"), excluding "Intro to Programming" or any Java related programming courses. Dispaly Course_No, course description, Section_No, section location, and section capacity. If a course has no section, then display "N/A" for section location and leave other section related columns blank. (HINT: left join COURSE and SECTION; use the NVL function)
Q4. Show the address information for all Flushing, NY students who live in an apartment (if address contains "#"). Display student first name, last name, street information (number and street name), and apartment number. (HINT: use string functions such as SUBSTR and INSTR)
Sample Result:
FIRST_NAME LAST_NAME STREET_INFORMATION APARTMENT_NUMBER
Mary Axch 144-7041st Ave. #4T
Q5. For sections offered for Intro To Programming, calculate and display number of sections offered, total capacity, lowest capacity, highest capacity, and average capacity. (HINT: use functions such as COUNT, SUM, MIN, MAX, and AVG)
Q6. List all course sections that have a start date on or after 6/1/1999 and have not been enrolled by any student. Display section ID, course No, start_date_time. (HINT: use left join and TO_DATE function)
Q7. For all Programming related course sections taught by Anita Morris, calculate and list total number of sections and total capacity. (HINT: join INSTRUCTOR, SECTION, and COURSE)
Q8. List all students who took a course from Anita Morris and who enrolled 90 days or more before section start date. Display student first name, last name, enroll date, section start date, and instructor phone number. (HINT: join STUDENT, ENROLLMENT, SECTION, and INSTRUCTOR; use section.start_date_time - enrollment.enroll_date to calculate number of days in between)
q9. For all sections taught by Anita Morris, calculate the average of the Final grade (HINT: join INSTRUCTOR, SECTION, ENROLLMENT, and GRADE; use FI as grade_type_code)
q10. Find any student/instructor pairs so that the student has taken a course taught by the instructor and they live in the same zipcode. Display student first and last name, instructor first and last name, and their zipcode

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

What are the determinants of cash cycle ? Explain

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago