| | |
sql using oracle
Please support our Oracle advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2009
Posts: 6
Reputation:
Solved Threads: 0
This is a problem that is killing me. It is a school assignment and I can't figure it out so any help will be great. I have eleven questions, and I have five of them answered.
I have these tables with these fields:
Table:sales_rep
Columns:Last|First|Street|City|St|Zip_Code|Total_Commision|Commision_Rate
Table:customer
Columns:Last|First|Street|City|St|Zip_Code|Balance|Credit_Limit|slsrep_number
Table:part
Columns: Part_number|part_description|Units_on_hand|it|warehouse_number|unit_price
Table:orders
Columns:Order_Number|order_date|customer_number
Table:order_line
Columns:Order_Number|part_number|number_ordered|quoted_price
Now here is my questions along with the ones I have answers to.
Find the last name and first name for every customer who has a credit limit of at least $800.
Give the order number for every order placed by customer number 124 on 9/05/1998.
List the customer number, last name, and first name for every customer represented by sales rep 03 or sales rep 12.
List the part number and part description for every part that is not in item class HW.
List the part number and part description for every part that has between 100 and 200 units on hand.
From here I'm lost can anyone give me some help. Please.
List the name of all customers who has a balance less than their credit limit.
For every order, list the order number, order date, part number, part description, and number of units ordered.
Find the customer number, last name nad first name for every customer who currently has an order on file for an iron.
List the part description, part number, order number and order date for every order placed by Mary Nelson that does not contain an order line for a treadmill. You must use the set operation of minus to do this problem.
List the order number and order date for every order that was placed by Mary Nelson or that contains an order line for an iron. You must use the set operation of union to do this problem.
List the order number and order date for every order that was placed by Mary Nelson and contains an order line for an iron. You must use the set operation of intersection on this problem.
I have these tables with these fields:
Table:sales_rep
Columns:Last|First|Street|City|St|Zip_Code|Total_Commision|Commision_Rate
Table:customer
Columns:Last|First|Street|City|St|Zip_Code|Balance|Credit_Limit|slsrep_number
Table:part
Columns: Part_number|part_description|Units_on_hand|it|warehouse_number|unit_price
Table:orders
Columns:Order_Number|order_date|customer_number
Table:order_line
Columns:Order_Number|part_number|number_ordered|quoted_price
Now here is my questions along with the ones I have answers to.
Find the last name and first name for every customer who has a credit limit of at least $800.
Oracle Syntax (Toggle Plain Text)
SELECT last,first FROM customer WHILE credit_limit>799;
Give the order number for every order placed by customer number 124 on 9/05/1998.
Oracle Syntax (Toggle Plain Text)
SELECT order_number FROM orders WHILE order_date='05-SEP-02';
List the customer number, last name, and first name for every customer represented by sales rep 03 or sales rep 12.
Oracle Syntax (Toggle Plain Text)
SELECT customer_number,last,first FROM customer WHILE slsrep_number=3 AND slsrep_number=12;
List the part number and part description for every part that is not in item class HW.
Oracle Syntax (Toggle Plain Text)
SELECT part_number,part_description FROM part WHEN it <>'HW';
List the part number and part description for every part that has between 100 and 200 units on hand.
Oracle Syntax (Toggle Plain Text)
SELECT part_number,part_description FROM part WHERE units_on_hand>99 AND units_on_hand<201
From here I'm lost can anyone give me some help. Please.
List the name of all customers who has a balance less than their credit limit.
Oracle Syntax (Toggle Plain Text)
SELECT last,first FROM customer WHERE balance<credit_limit;
For every order, list the order number, order date, part number, part description, and number of units ordered.
Find the customer number, last name nad first name for every customer who currently has an order on file for an iron.
List the part description, part number, order number and order date for every order placed by Mary Nelson that does not contain an order line for a treadmill. You must use the set operation of minus to do this problem.
List the order number and order date for every order that was placed by Mary Nelson or that contains an order line for an iron. You must use the set operation of union to do this problem.
List the order number and order date for every order that was placed by Mary Nelson and contains an order line for an iron. You must use the set operation of intersection on this problem.
Last edited by peter_budo; Oct 1st, 2009 at 5:39 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
- Help! Needed to create Oracle abstract data types and collections using SQL*Plus (Oracle)
- What is the major difference between ORACLE & SQL SERver & MYSQL?can any one explain? (Oracle)
- Oracle Help Vb.net application (VB.NET)
- SQL Development (IT Professionals' Lounge)
- help in SQL *plus and VB6 conection (Visual Basic 4 / 5 / 6)
- Oracle Busines Intelligence Developer (Software Development Job Offers)
- Sql??????? (PHP)
- Oracle (Oracle)
- Does SQL , ORACLE + MySQL support two-byte integers? (Oracle)
- oracle or sql server2000, which is best? (Oracle)
Other Threads in the Oracle Forum
- Previous Thread: Beginner Oracle Help
- Next Thread: Help cursor/procedure
| Thread Tools | Search this Thread |
2009predictions acquisition amazon.com bartz bernanke cia citrix cloudcomputing crm database dell economy editor enterprise enterprise2.0 enterprisesoftware federalreserve forbes hp ibm intellipedia internet larryellison layoffs linux loughridge mediawiki michaeljackson microsoft neverland nortel notebooks oil operatingsystem oracle palm rimm saas salesforce sap seagate socialcomputing sql sun sybase technologystocks virtualiron virtualization vmware wiki wikipedia xen yahoo zoho






