Question

SQL help (all parts are related to each other so please answer them all, thank you!)...

SQL help (all parts are related to each other so please answer them all, thank you!)

https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all

A.Find the number of suppliers for each of the product category
B.Find the totalprice for each order, sort them based on pricein descending order
C.Find the category name and description for each product in Table Products
D.Find the EmployeeID who has the highest order amount(e.g. the total dollar amount for an order)in July 1996
E.Find the top three countries whereconsumers purchased the most(e.g. the total dollar amount for all orders placed for goods originatedfrom a country)in all periods

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A.
SELECT Categories.CategoryName, count(*) as count
FROM Products, Categories
where Categories.CategoryID = Products.CategoryID
group by Categories.CategoryName, Products.CategoryID

B.

SELECT Orders.OrderID, sum(OrderDetails.Quantity * Products.Price) as Total

FROM Orders, OrderDetails, Products

where Orders.OrderID = OrderDetails.OrderID
and OrderDetails.ProductID = Products.ProductID

group by Orders.OrderID
order by total desc

C.
SELECT Categories.CategoryName, Categories.Description, Products.ProductName
FROM Categories, Products
where Categories.CategoryID = Categories.CategoryID

Answering first 3 questions, as queries are taking a lot of time, and they are detailed queries, not simple select statements.

Add a comment
Know the answer?
Add Answer to:
SQL help (all parts are related to each other so please answer them all, thank you!)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • If possible please just send the SQL statement. Thank you Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top o...

    If possible please just send the SQL statement. Thank you Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top of each page. Also, using a 12-point font, include the SQL statement and then provide a screen shot of each query. The screen shots must include both the SQL statement and the results for each item below based on the data entered in...

  • please help with these please i am so confused. please do all them. thank you. Multiple...

    please help with these please i am so confused. please do all them. thank you. Multiple Choice Idently the choice that best completes the statement or answer the question 1. What is the primary criterion for the preparation of managerial accounting reports? a. Relevance of the reports b. Meet the manager needs c. Timing of the reports d. Cost of the reports 2. Which of the following is considered a part of factory overhead cost? a. Sales commissions b. Depreciation...

  • Please help me on the SQL queries, thank you so much. Write a query to display the title and publisher as well as the p...

    Please help me on the SQL queries, thank you so much. Write a query to display the title and publisher as well as the publisher contact for each book using JOIN...USING clause. Write a query to show the first and last names of customers who have ordered cooking books. Use the WHERE clause to join the tables. Write a query to show the title, cost and ISBN of each book in the books table. If the book has been ordered,...

  • please help with 3 question in detail on excel. thank you CASE STUDY The Sourcing Decision...

    please help with 3 question in detail on excel. thank you CASE STUDY The Sourcing Decision at Forever Young Forever Young is a retailer of trendy and low-cost apparel in the United States. The company divides the year into four sales seasons of about three months each supplier costs 55 yuan/unit (inclusive of all delivery and brings in new merchandise for each season. The company has historically outsourced production to China given the lower costs. Sourcing from the Chinese costs),...

  • please help with these please i am so confused. please do all them. thank you. 14....

    please help with these please i am so confused. please do all them. thank you. 14. The basis for recording direct and indirect labor costs incurred is a summary of the period a job order cost sheets b. time tickets c. employees' earnings records d clock cards 15. At the end of the fiscal year, the balance in Factory Overhead is small. This balance would normally be: a. transferred to Work in Process b. transferred to Cost of Goods Sold...

  • Show all work please. Thank you! Luke Corporation produces a variety of products, each within their...

    Show all work please. Thank you! Luke Corporation produces a variety of products, each within their own division. Last year, the managers at Luke developed and began marketing a new chewing gum, Bubbs, to sell in vending machines. The product, which sells for $5.30 per case, has not had the market success that managers expected and the company is considering dropping Bubbs. The product-line income statement for the past 12 months follows: $ 14,683,650 Revenue Costs Manufacturing costs Allocated corporate...

  • Please answer all parts. thank you! Low-regular-and-extra dividend policy Bennett Farm Equipment Sales, Inc. is in...

    Please answer all parts. thank you! Low-regular-and-extra dividend policy Bennett Farm Equipment Sales, Inc. is in a highly cyclical business. Although the firm has a target payout ratio of 25 %, its board realizes that strict adherence to that ratio would result in a fuctuating dividend and create uncertainty for the firm's stockholders. Therefore, the firm has declared a regular dividend of $0.60 per share per year with extra cash dividends to be paid when earnings justify them. Earnings per...

  • please help with all 10 required parts! Thank you! The management of Zigby Manufacturing prepared the...

    please help with all 10 required parts! Thank you! The management of Zigby Manufacturing prepared the following estimated balance sheet for March 2019. ZIGBY MANUFACTURING Estimated Balance Sheet March 31, 2019 Assets Cash Accounts receivable Raw materials inventory Finished goods inventory Total current assets Equipment Accumulated depreciation Equipment, net Total assets Liabilities and Equity Accounts payable Short-term notes payable Total current liabilities Long-term note payable Total liabilities Common stock Retained earnings Total stockholders' equity Total liabilities and equity $ 48,000...

  • Please help me the answer of Req 5, thank you very much! 1 Week 11 Problems...

    Please help me the answer of Req 5, thank you very much! 1 Week 11 Problems * Andretti Company has a single product called a Dak. The company normally produces and sells 90,000 Daks each year at a selling price of $64 per unit. The company's unit costs at this level of activity are given below 3 Direct materials Direct labor Variable manufacturing overhead Fixed manufacturing overhead Variable selling expenses Fixed selling expenses Total cost per unit 8.50 8.00 3.00...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT