Question: SQLDeveloper Help to write a set of SQL queries. 1. Give an alphabetical list of all cities that contain at least one warehouse. 2. Give

SQLDeveloper

Help to write a set of SQL queries.

SQLDeveloper Help to write a set of SQL queries. 1. Give an

1. Give an alphabetical list of all cities that contain at least one warehouse.

2. Give a count of how many warehouses there are that have size more than 50000 square feet. (The result of this query should be just a single number.)

3. For each state, give the name of the state and the number of square feet of the largest warehouse in that state. List the states in alphabetical order.

4. List the product IDs and costs of all products of type Electronics, from the most expensive product to the least expensive product.

5. Give the description and type for all products that cost less than 300.00, listed from the lowest-cost product to the highest-cost product.

6. For each product that contains the word Desk anywhere in its description, give the product ID, description, and cost. List the products alphabetically by their descriptions.

7. List the product ID and amount for all inventory checks done on the warehouse with ID 333. Order the output from the largest amount to the smallest.

8. For each date on which at least one inventory check was made, give the date and how many checks were made on that date, from date the most checks were made to the date the fewest checks were made. 9. Give the warehouse ID, product ID, and date for every inventory check done during December of 2020 that is, between December 1st, 2020 and December 31st, 2020 inclusive. Order the output by the date, and for checks made on the same date, order by the warehouse ID.

WAREHOUSE(WarehouseID, City, State, SqFt, Manager) INVENTORY(WID, PID, Amount, LastChecked) PRODUCT (ProductID. Description, Type, Cost) In addition to the primary keys underlined above, WID in INVENTORY is a foreign key referencing WarehouseID in PRODUCT, and PID in INVENTORY is a foreign key referencing PID in PRODUCT. In SQL Developer, look at the Columns, Data, and Constraints for each of the three tables before continuing, to be sure that they have been constructed correctly. You might also want to draw the foreign keys and reference arrows into the set of relation schemas given above to be sure that you understand the links among the tables

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!