Write ten sql statements against the student schema

Assignment Help PL-SQL Programming
Reference no: EM133483492

Assignment: SQL Statements

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.

Question A. 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

Question B. 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)

Question C. 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)

Question D. 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-70 41st Ave. #4T

Question E. 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)

Question F. 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)

Question G. 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)

Question H. 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)

Question I. 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)

Question J. 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.

Reference no: EM133483492

Questions Cloud

Describes language-based actions we can all use : Describes language-based actions we can all use in our communication to adjust perceptions of First Nations Peoples
Research the history of ippb : Discuss the original uses and benefits compared to what the new data has found on the therapy. Discuss risks versus benefits, costs versus effectiveness, etc.
Describe any actions to promote the public image of nursing : Discuss challenges that have been created by media and are generally present in American society. Describe any actions to promote the public image of nursing.
How are social institutions or society : How are social institutions or society or individual(s) in the article addressing the inequality, prejudice, stereotype, or discrimination
Write ten sql statements against the student schema : Write 10 SQL statements against the STUDENT schema. Display the number of students who live on the 40th St in Brooklyn, NY.
How do representation of buddha differ throughout south asia : GED240- How do representations of Buddha differ throughout South and Southeast Asia? The short-form citation is written inside parentheses.
Difference between sirs-sepsis and septic shock : Why are nurses essential in the prompt identification and treatment of patients with sepsis? What is the difference between SIRS, sepsis and septic shock?
What kind of elementary school did you attend : What kind of elementary school did you attend? Did you study in your first language or English? What kind of reading and writing did you do then?
Discuss contraindications for the medication : For each medication, discuss all indications, its mechanism of action, excretion, half-life, and contraindications for the medication.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd