The company which uses this database is called AdventureWorks.
The company which uses this database is called AdventureWorks. The ProductVendor table shows the supplier (also
called the vendor) for each product. Write out the SQL that would provide a count of number of products from each vendor. The output should show the name of each vendor and a count of the number of products they supply. Write out the SQL that would accomplish this. ATTACHMENT PREVIEW Download attachmentWeek 3 Discussion ProblemsConsider the following porTon of a database schema:Using the tables and column names in this schema, write out the SQL that would achieve theresult set speciFed in the problems below.*1.±he company which uses this database is called AdventureWorks.±he ProductVendor tableshows the supplier (also called the vendor) for each product.Write out the SQL that wouldprovide a count of number of products from each vendor.±he output should show the name ofeach vendor and a count of the number of products they supply.Write out the SQL that wouldaccomplish this.
![Background image of page 1](https://www.coursehero.com/doc-asset/bg/qattachments_c9e00003a88fd291c39eb509c3c52bcc3de3fccd/page-1-html-bg.jpg)
View the Answer2.The Product and Product Vendor tables show a variety of related informa±on.Write out theSQL that will display the VendorID, VendorName, each ProductID and the standard price of theproduct.Also, provide an addi±onal column that increases the standard price by 10%, roundingthe results to two decimal places.Addi±onally, display the LastReceiptDate as mm/dd/yyyywith no ±mestamp.Write out the SQL that would accomplish this.3.Change the previous query to include the vendorcontac²ypeID. (This requires adding anaddi±onal table to your SQL statement and modifying the SELECT clause.)Write out the SQLthat would accomplish this.4.Provide a list of produc±d’s, the name of the vendor and their credit ra±ng.The resultsshould be ordered by last name and then by credit ra±ng.Write out the SQL that wouldaccomplish this.5.Produce a list of all produc±d’s, product names, the quan±ty on order, and the name of thevendor from which the product is supplied.Write out the SQL that accomplishes this.6.The company would like to create a list of products that are currently on order.The resultsshould display the name of each product and the total OnOrder quan±ty.Display the list inascending order of the total quan±ty on order.Write out the SQL that accomplishes this7.The company would like to produce a list that shows the name of each vendor as well as itsaddressline1, city, and postal code.The list should be sorted by vendor name in descendingorder.Write out the SQL that accomplishes this.8.Create the SQL that will generate a list of all vendor names and the average quan±tyonorderfrom each vendor.Order the result set by Vendor name in ascending order. Write out the SQLthat accomplishes this.9.Create the SQL that would generate a list of all vendor names, the leF 3 characters of theirname (to be used as a short-form code), and their AddressTypeName.Order the data byAddressTypeName in descending order.10.Create the SQL that would generate a list of Ci±es and a count of the number of vendorswithin each city.Order the data by city in ascending order.___________________________________________________________________________*³or the purpose of this exercise, you can ignore the table name por±ons in parentheses whenwri±ng out your SQL queries.However, if you were to actually type this SQL into a SQL ServerQuery window, you would reference each table using the word in parenthesis followed by aperiod and then the table name.³or example, the Vendor table would be referenced as follows:Purchasing.Vendor
![Background image of page 2](https://www.coursehero.com/doc-asset/bg/qattachments_c9e00003a88fd291c39eb509c3c52bcc3de3fccd/page-2-html-bg.jpg)
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
![](https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img,w_320,h_80/http://academicheroes.com/wp-content/uploads/2018/09/order_now.png)