Provide screenshots for the sql query

Assignment Help PL-SQL Programming
Reference no: EM131572392

Assignment

1. Populate your "student" table with at 20 or more students, such that:

• At least 6 of them (but not all!) have the last name "Jonesy"
• At least 1 of them has a GPA of 3.85
• At least 2 of them have a GPA of 3.7 and 3.84, respectively
• At least 2 of them have a GPA of 2.7 and 3.69,respectively
• At least 2 of them have a GPA of 1.7 and 2.69,respectively
• At least 2 of them have a GPA of 1.0 and 1.69,respectively
• At least 1 has a GPAof1.0
• At least 6 of them are from state DE
• More than 7are from NJ
• More than 4 are from RI (Rhode Island)
• At least 1 is from some other state than listed here
• More than 2 have more than 96 credits
• At least 3 of them have credits of 32, 33, 64, 65, and 96, respectively
• At least 1 of them has less than32 credits
• At least3have between 65-96 credits
• At least 3 have between 33-64 credits

To accomplish this, you can use the "insert" command (multiple times) via the command-line interface or web interface. Example of how to insert Sally Smith record into your table:

insert into student values ('1', 'Sally', 'Smith', '10 Main St.', 'NJ', '3.92', '98');

Note that the value of the field "id," while arbitrary must be unique for all students. (That's why it is designated as the "primary key.") I recommend that you simply assign the id's sequentially, that is, the first student is 1, the second is 2, etc.

GPA

Recognition Letters

3.85 or above

A+ or High Honors

3.7 - 3.84

Honors

2.7 - 3.69

B

1.7 - 2.69

C

1.0 - 1.69

D

Below 1.0

F

Credits

School level

More than 96

Senior

65-96

Junior

33-64

Sophomore

Less than 33

Freshman

2. Try creating another student with the id 1 (the same as Sally's).

a. Screenshot the results of the following query and insert it into your homework WORD document:

insert into student values ('1', 'Bob', 'Smith', '14 King Blvd.', 'NY', '3.17', '124');

b. How does MySQL respond? Explain what the message displayed means.

3. Use the following SQL query to retrieve all records. Take a screenshot and insert it into your homework WORD document:

select * from student;

4. Screenshot the results of the following query and insert it into your homework WORD document:

select gpa, lastname, state from student where state='RI';

The query shows 3 columns for the gpa, lastname and state fields and it only displays students from RI.

5. Next, write and run (issue) SQL queries that do the following. For each query, provide screenshots for the SQL query and the results within a Word document so I can grade it.

a. Show all students with the last name Jonsey.

b. Retrieve all student names (first and last) with a B GPA (see table for definition in first question)and are NOT from NJ.

c. Retrieve all students that are NOT in honors (see table for definition in first question)

d. Retrieve lastname, gpa, and credits of all DE and RIfreshman (see table for definition in first question). Order the results by last name.

e. Display the query and the results to determine if there are any students from NJ with High Honors.

f. Retrieve the lastnames and credits of all students that are NOT from NJ, RI or DE. Order by the state.

Reference no: EM131572392

Questions Cloud

Would you still choose the same theory : How does the theory you would choose change based on the populations you may serve?Would you still choose the same theory?
Discuss the importance of cultural intelligence : Discuss the importance of cultural intelligence and its impact on the globalization of business operations. Support your positions with scholarly resources.
Discuss satisfiability problem and find values of variables : The maximum satisfiability problem asks for an assignment of truth values to the variables in a compound proposition in conjunctive normal form.
What type of contract was utilized as the foundation : What type of contract was utilized as the foundation for the case plan.Compare it with another type of contract, explaining why the one chosen was used instead.
Provide screenshots for the sql query : For each query, provide screenshots for the SQL query and the results within a Word document so I can grade it.
What information is contained in a bond indenture : What information is contained in a bond indenture? What purpose does it serve
Generate a random permutation of a sequence of n terms : The following method can be used to generate a random permutation of a sequence of n terms. First, interchange the nth term and the r(n)th term where r(n).
Identify the key components of stockholders equity : Describe the accounting procedures for issuing stock?How do Journal the issuance of Stock; show the Journal Entry
Compare and contrast common & preferred stock : Compare and Contrast Common & Preferred Stock and What are the characteristics of Common Stock

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