Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Purpose:

This laboratory provides practice in the creation and use of basic and advanced SQL queries involving one table in a DB schema.

Procedure:

Using your assigned user name, password, and host string, log in to Oracle SQL*Plus, and open a spool file to collect your dialog.  Create queries to answer the following questions.  Your queries should be written so that they use only the data provided and display only the data requested.

Don't edit the initial spool file. You will make mistakes and will not be penalized for them.  Attach it to the back of your report.  Follow the instructor's instruction concerning any additional required items, any needed sign-offs, and the due date of this report.

Part A:

1. Display the ids and names for all customers.

2. Display all the data in the sales representative table.

3. Display the names of all customers whose credit limits are $10,000 or more.

4. Display the invoice number for all orders placed by the customer whose id is 1619 on September 13, 2007.  Please note: A date in a condition should be in the form '13-SEP-07'.

5. Display the id and the name for all customers whose sales representative has an id of either 237 or 268.

6. Display the id and description for all products whose type is not AP.

7. Display the id, the description, and the number of items for each product that has between 12 and 30 items. Perform this query two different ways.

8. Display the id, the description, and the total value (product quantity * product price) of each product whose product type is HW.  Assign the column name TOTAL_VALUE to this calculation.

9. Display the id, the description, and the total value (product quantity * product price) of each product whose total value is greater than or equal to $4,000.  Assign the column name TOTAL_VALUE to the calculation.

10. Display the id and the description for each product whose type is either SG or AP using the IN operator.

11. Determine the id and the name of each customer whose name starts with the letter "S".

Part B:

12. Display all the data in the products table.  Order the display by the product description.

13. Display all the data in the products table.  Order the display by product type.  Within each product type, order the display by product id.

14. Determine the number of customers whose balances are less than their credit limits.

15. Display the total of the balances of all customers who are represented by sales representative 237 and whose balances are less than their credit limits.

16. Display the id, the description, and the total value of each product whose number of items is greater than the average number of items for all products. You may want to use a subquery.

17. Display the balance of the customer whose balance is the smallest.

18. Display the id, the name, and the balance of the customer with the largest balance.

19. Display the sales representative's id and the sum of the balances of all customers represented by each of these sales representatives. Group and order the display by the sales representative ids.

20. Display the sales representative's id and the sum of the balances of all customers represented by each of these sales representatives, but limit the result to those sales representatives whose sum is more than $12,000.

21. Display the ids of all products whose description is not known.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91416184
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Question suppose your il license encodes your name sex and

Question : Suppose your IL license encodes your name, sex, and birthday month/year which can be used by police officers and bouncers to determine if you are who your license says you are. What kind of encoding would this ...

What effect does the teacher have on creating a learning

What effect does the teacher have on creating a learning environment with little to no behavior problems?

Describe 2 variables a government will look at to predict

Describe 2 variables a government will look at to predict where the economy will be in the next six months.

Suppose youve designed a mips processor implementation in

Suppose you've designed a MIPS processor implementation in which the stages take the following lengths of time: IF=20ns, ID=10ns, EX=20ns, MEM=35ns, WB=10ns. What is the minimum clock period for which your processor func ...

Please solve the following question using java format

please solve the following question using java format (*Solution can include*if needed* ( if statement, switch, while ) not arrays*) Write a program which performs the following: a) Prompts the user to enter a number N b ...

Question research microwave serices and report on what

Question : Research microwave serices and report on what kinds of applications can be supported, what equipment will be necessary, where the equipment will be located, and what services these companies that offers.

For the rosenberg land development problem problem 2 in

For the Rosenberg Land Development problem (Problem 2 in Chapter 14), suppose that the construction costs are uncertain. Specifically, assume that the distribution ofconstruction costs is normally distributed, with the m ...

Question suppose your network is using the stop and wait

Question Suppose your network is using the stop and wait protocol and it is really providing a slow service. You calculate the Utilization and it is 95.75%. Would getting faster Ethernet cards help speed up the network? ...

In my sample database i need to use select statements to

In my sample database I need to use SELECT statements to find the following: 1) Find the full names of supervisors together with the total number of employees directly supervised by each one of them. 2) Find the full nam ...

Explain that when an unauthorized individual gains access

Explain that when an unauthorized individual gains access to the information an organization trying to protect, that act is categorized as a deliberate act of espionage or trespass.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As