Sql script to create and populate the tables, PL-SQL Programming

Create the four tables and populate them with the given data. Answer the following queries in SQL.

1. Get all part-color/part-city combinations. Note: Here and subsequently, the term "all" is to be taken to mean "all currently represented in the database" not "all possible".  

2. Get all supplier-number/part-number/job-number triples such that the indicated supplier, part, and job are colocated.  

3. Get all supplier-number/part-number/job-number triples such that the no two of the indicated supplier, part, and job are colocated.  

4. Get all pairs of part numbers such that some supplier supplies both the indicated parts. 

5. Get job numbers for jobs whose city is first in the alphabetic list of such cities.

6. Get job numbers for jobs not supplied with any red part by any London supplier.  

7. Get part numbers for parts supplied to all jobs in London.  

8. Get supplier numbers for suppliers who supply the same part to all jobs.  

9. Get the total quantity of part P1 supplied by supplier S1.  

10. Get part number for parts that are supplied either by a London supplier or to a London job.

Please turn in the following materials:

1.  A SQL script to create and populate the tables.

2.  A SQL script to answer the queries.

3.  The results of your queries.

Posted Date: 3/12/2013 2:46:05 AM | Location : United States







Related Discussions:- Sql script to create and populate the tables, Assignment Help, Ask Question on Sql script to create and populate the tables, Get Answer, Expert's Help, Sql script to create and populate the tables Discussions

Write discussion on Sql script to create and populate the tables
Your posts are moderated
Related Questions
Advantages of Subprograms The Subprograms give extensibility; that is, tailor the PL/SQL language to suit your requirements. For illustration, if you require a procedure which

Write a stored procedure that accepts the post code in which the customer resides as the input parameter. The procedure should then use an explicit cursor to display comprehensive

LAWS / RULES - Dollo's Law                     :           Living organisms do exhibit evolutionary irreversibility or evolution is irreversible. Williston's Law

DECLARE : This keyword signals the beginning of the declarative section of the PL/SQL block, that contains local declarations. The Items declared locally exist only within the

Query: SELECT * FROM EMPLOYEE1; Select 5 columns and all rows from one table Query: SELECT C_ID, COMPANY, BUILDING, DEPARTMENT, BRANCH FROM CONTRACT;

Defining and Declaring Collections To create the collections, you must define a collection type, and then declare the collections of that type. You can define the VARRAY types a

Boolean Values Only the values TRUE, FALSE, & NULL can be assigned to a Boolean variable. For illustration, given the declaration DECLARE done BOOLEAN; the following statements

Assignment of Variable - Updating a Variable Syntax: SET SN = SID ('S2'); This can obviously be read as "set the variable SN to be equal in value to SID ( 'S2' )".

Need Azure CRM Web Application with two-factor authentication We presently have a CRM-like database stored on MS Azure that we presently access over an MS Access application. It

CHECK Constraints in SQL A CHECK constraint is a table constraint defined using the key word CHECK, as already illustrated in several examples in this chapter. In particular,