Consider the relational schema of part of a firm database

Assignment Help PL-SQL Programming
Reference no: EM13380338

Consider the relational schema of (part of) a firm database below. Write a SQL query for each of the following requirement. Run the queries using the database uploaded with the assignment and display the results.

1115_Relational schema.png

1. List the Vend_ID, Vend_Name, Vend_Contact of all vendors whose LAST name begins with 'C'. List them in descending order of Vend_City. (Query should return 2 rows)

2. List the vendor city and the number of vendors in each city where the number of vendors is greater than 2. Use the alias TotalVendors for the number of vendors.(Query should return 2 rows)

3. Display Ord_ID, Ord_Date of all orders where condition (c) is met and simultaneously either one of conditions (a) and (b) are met

a) Vend_ID starts with the letter "P"

b) Ord_Status is "Rec"

c) Ord_Tot_Cost is greater than or equal to $2000 but less   than or equal to $5500

(Query should return 4 rows)

4. Display the loc_description and item_id of all items whose storage quantity is greater than 15. (Query should return 4 rows)

5. Display the Rep_ID, Rep_Date and Item_ID of all items where either the Rep_Cost is less than $50 or the Item_Buy_Datedate is between 1/1/1910 and 1/1/1915.(Query should return 4 rows)

6. Display the ID and name of vendors who have NOT placed any order.(Query should return 3 rows)

7. Display the item ID, store quantity and location description of the items having the lowest store quantity. Note: there are three such items.(Query should return 3 rows)

8. Display the vendor ID and vendor name of the items whose item quantity is the largest. (Query should return 2 rows)

9. Display the item ID and item quantity of all items whoseitem quantity is less than the average quantity. Also display the average quantity.(Query should return 6 rows)

10. How many times the vendor has placed an order for the item ID = 1 (rename it as NUMORD)? Also display the vendor name and the location description for the item_ID = 1? Write a single query to obtain the results.

Attachment:- Relational schema.accdb

Reference no: EM13380338

Questions Cloud

You have no guarantees about the accuracy of the input from : you have no guarantees about the accuracy of the input from the user. you have to check all input and give helpful
Write a program called a2p1 to run in the lc-3 simulator : write a program called a2p1 to run in the lc-3 simulator. the program asks for the user to type in his or her upi. then
Part 1 you will implement a program where the computer : part 1 you will implement a program where the computer plays against a human opponent. the game will start with a
Proceed according to the following instructionsidentify a : proceed according to the following instructions.identify a recent within the last six 6 months moral dilemma or
Consider the relational schema of part of a firm database : consider the relational schema of part of a firm database below. write a sql query for each of the following
1decryption speeda certain cryptography vendor was : 1.decryption speeda certain cryptography vendor was providing an encryption technology that was breakable within 10
You have been hired as an information systems consultant to : you have been hired as an information systems consultant to examine state health centre a fictitious multi-centre state
Noticethatcorporatemanagementhasinthisexampleidentifiedandde : noticethatcorporatemanagementhasinthisexampleidentifiedanddevelopedtheconceptofaswellasdefinedtherequirementstaskmandate
Inadynamicbusinessmodelwealsorepresentthelife-cyclerelations : inadynamicbusinessmodelwealsorepresentthelife-cyclerelationshipsamongtheseentitiesshowingwhichentityisresponsibleforwhic

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  F does not logically imply

Given R = (J,K,L ) and the set F of FDs J -> K and L -> K , show that F does NOT logically

  Pl-sql block to display last name and salary

Write a PL/SQL block that displays the last name and salary of the following people. Each of these can be done separately as PL/SQL, first to test and get the output lines then encapsulated.

  Write programme in oracle to make employee table

List the employee_id and employee_name of the employees form the l_employees table with the top 4 credit limits.

  Execute queries to confirm that the basket order status

Execute queries to confirm that the basket order status and product stock levels have been appropriately modified by the trigger.

  Write a perl subroutine for temperature conversion

Write a perl subroutine for temperature conversion named ' convert_temp '. It should be able to handle both Fahrenheit to Celsius conversions as well as Celsius to Fahrenheit conversions.

  What could the mds that violate 4nf be

Let's define the rating of a director to be the average rating of all his/her movies. Find the names and ratings of all directors who have directed movies starring Al Pacino.

  Display all the lastnames from the customers table

Display all the LastNames from the Customers table and any associated OrdersIDs from the Orders Table. Show the LastName even if they do not have any associated orders. Order the results by LastName in ascending order.

  How to understand sql ddl and dml

Task one will provide a relational database implementation of the sample solution from the first assignment. This should be done using CASE software (the choice will be up to you).

  Submit the table creation statements for the database model

submit the table creation statements for the database model. submit them all in a single script file.also submit a

  Create tables using sql ddl

Write the SQL DDL to create the database that contains each of the relations shown in the above ERD. You will need to provide - Your DDL code for each table that you create and a screenshot showing each table that is created.

  Who are the opposition leaders

Write SQL SELECT statements to retrieve the following information from the prime_minister database.

  Perform the tasks below by using the correct sql statements

Create a view so that supplier 'ASP' can only see his information from the l_foods table.  Call this view_l_foods_ASP.  Show columns supplier_id, product_code, menu_item, description, and price in your view.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd