Thursday, February 6, 2020
Advanced SQL Queries for the Pine Valley Furniture Company Database Term Paper
Advanced SQL Queries for the Pine Valley Furniture Company Database - Term Paper Example To get the result, we need to sort the prices of the products and choose the one that is the least among them all. In the parameters for the queries, we indicate that we would like to pick the top item from the field whose values have been sorted in ascending order. From then on, we display the top 1 item to show us the least item in terms of the price. This query is obtained from the employee table and the work center table. From the employee table, we get the employee identifications and the names of the employees. The work center table is only meant to give us the work center identifications for the employees. Once we get the values from both of the tables, we make the query. The above query is made on the order line table of the database. This table contains both the order ids as well as the product identification numbers. In order to know which different products are contained in the order number 1006, we design the query in such a way that we display the order ids for all the product lines while indicating the product line number 1006 as the only restriction on the query. In order to know the discounted product prices for the products manufactured by the product line 3, we need to calculate the discounted prices and display them on a different column. The operands for the calculation are the Standard_Price for all the products, and 0.9.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.