Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Generate a list of products that cost $50 or more. Show the product\'s name, pri

ID: 3761727 • Letter: G

Question

Generate a list of products that cost $50 or more. Show the product's name, price, and category. Order the results by product name.

Northwind wants to know which suppliers send them the most products. Build a query to show, for every supplier, their name and the number of products they supply. Show the suppliers in order of number of products supplied from highest to lowest.

Over the past year, the managers at Northwind have noticed a lot of broken glass in the stock rooms. It turns out that some of the products are being sent over in jars, and the employees aren't used to working with glass. Management wants to know which products come packaged in jars. Look for products that have the word "jar" somewhere inside their Unit field. Show the product name, unit, and name of the supplier. Sort by product name.

Northwind had a banner year in 1997, and management wants to send a flyer out to all the customers who placed orders that year to encourage them to come on in and buy more products. Write a query that displays the name and mailing address of all customers who placed orders that year.

Management needs a report showing all of the orders placed from 1997 to today. They want to see the Order ID, the customer's name, and the name of the employee who helped the customer place the order.

The executives at Northwind wants to know what their five most expensive products are and who supplies them. Display the name of the product, it's price, and the name of the supplier. Show the results in descending order by price. HINT: Make sure you only include products that customers have ordered. If any of the products in your top five list are not in any orders, they don't count.

Management wants to know who their most senior employees are. Display the full name and date of birth of all the employees going from oldest to youngest.

Generate a report showing the cost of each order using current product prices. The total cost for an order is obtained by multiplying the price of the each product in the order by the quantity desired and then adding them together. Order the results from highest order amount to lowest. HINT: Use the Sum function, and within it multiply the Product.Price by the OrderDetails.Quantity. To round a value to the hundredths place and put a dollar sign in front of it, you can use '$' + Format(expression, '0.00') whereexpression is whatever you want to display. If you create an alias for your calculation of the order totals, you cannot use the alias in the order by clause. Instead, you have to duplicate the formula you used to determine the order total again in the ORDER BY clause.

Write a query to show the number of products per category, sorted by category name. Show the category name and product count for each category.

Write a query to show which shipper is used the most for customer orders.

Explanation / Answer

select distinct a.Category_Name, b.Product_Name, b.Quantity_Per_Unit, b.Units_In_Stock, b.Discontinued from Categories a inner join Products b on a.Category_ID = b.Category_ID where b.Discontinued = 'N' order by a.Category_Name, b.Product_Name;