Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING THE ORACLE DEMO TABLES Write SQL scripts to retrieve the following using the Oracle demo tables: 1. The total number of customers in each

USING THE ORACLE DEMO TABLES Write SQL scripts to retrieve the following using the Oracle demo tables:

1. The total number of customers in each sales area.

2. List the minimum salary for each job.

3. Show the total number of customers for each rep (repid).

4. List the average customer credit limit for each sales area.

5. Provide a figure for the total salaries of all employees.

6. List the total number of orders placed by each custid.

7. Show the total quantity of each product (prodid) ordered to date.

8. As per (1) above, but excluding customers in the SW area.

9. Show only cities with more than two customers.

10. The total number of customers for each repid but excluding any customers living in Leeds.

11. A script to prompt the user for a sales area and then to display the total number of customers in that area.

12. Show the total number of customers with names starting with B living in each city.

13. Show the total number of customers for each rep (repid), but only for reps with over 2 customers.

14. List the average salary for each job title, but include only job titles with more than two people, and exclude any jobs in Department 20.

15. For each rep, show the total number of customers with a credit limit of over 2000.

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_2

Step: 3

blur-text-image_3

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

Has the priority order been provided by someone else?

Answered: 1 week ago

Question

Compare the current team to the ideal team.

Answered: 1 week ago