Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using your assigned user name, password, and host string, log in to Oracle SQL*P

ID: 3763082 • Letter: U

Question

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 B:

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

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

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

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.

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.

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

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

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.

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.

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

Explanation / Answer

hi ,

I think these are the basic sql's and to give you the sql queries we need the proper data or else we can give you the syntex of the queries , anyway these are basic SQL's better you please go through the below tutorial.

This can help you to come over the laps of syntex plm.

http://www.techonthenet.com/sql/select.php