Question

In: Computer Science

The Board of Directors of Northwind have appointed Doug Hanus at their new CEO and Jeff...

The Board of Directors of Northwind have appointed Doug Hanus at their new CEO and Jeff Hogan as their operational manager. They are planning to devote their first two weeks in office to gain a better understanding of Northwind’s supply chain and marketing processes. As senior database analyst for Northwind, it is your responsibility to code appropriately structured SQL statements for retrieving the following information requested by Doug and Jeff. They need it on or before 09/29/2019.

  1. A listing of Northwind’s suppliers. [1 pt.]

  1. A listing of Northwind’s suppliers based in Norway and Sweden. [2 pts]

  1. A listing of Northwind’s product categories and the description of each product category. [2 pts]

  1. A clearer picture of the geographical footprint of their customers and suppliers - they want separate listings of the countries in which their customers and suppliers are located. [2 pts]

  1. The average, sum, maximum, and minimum per unit cost across all products in their product line. They would also like to know the names of Northwind’s products having per unit cost between 30 and 50 (both inclusive). [2 pts]
  1. A count and a listing of the cities and corresponding countries in North America (USA, Canada, Mexico) where they have a customer base. [3 pts]

  1. A listing of the product names and its corresponding category for products from suppliers based in Germany and France. [4 pts]

  1. A list of countries outside of North America (i.e. USA, Canada, Mexico) where they have less than 3 suppliers. [4 pts]

  1. For OrderIDs 10258, 10259, and 10260, a listing of the corresponding customer, employee who accepted the order, and the shipper. The listed must be sorted alphabetically by customer name. [5 pts]

  1. A listing of the product names and supplier names for all products that make up OrderIDs 10254 and 10260. [5 pts]

Solutions

Expert Solution

assuming northwind is the database name and suppliers is the table where the list of suppliers and their details are present

* A listing of Northwind’s suppliers. [1 pt.]

>use Northwind;

>SELECT * FROM suppliers;

*A listing of Northwind’s suppliers based in Norway and Sweden. [2 pts]

>SELECT * FROM suppliers WHERE country !== Sweden,Norway; (here country may be a column)

*A listing of Northwind’s product categories and the description of each product category

>use Northwind;

>SELECT DISTINCT[categories,price,description] FROM product;

* A clearer picture of the geographical footprint of their customers and suppliers - they want separate listings of the countries in which their customers and suppliers are located.

>SELECT customers.column_name, suppliers.column_name, customers.country, suppliers.country * FROM customers,suppliers;

{here you can give all the column names as you wish with the following syntax SELECT table_name.column_name * FROM table_name}

*The average, sum, maximum, and minimum per unit cost across all products in their product line. They would also like to know the names of Northwind’s products having per unit cost between 30 and 50 (both inclusive). [2 pts]

>SELECT sum(product_cost) as sum, MIN(product_cost) as minimum, MAX(product_cost) as maximum FROM product_table;

*A count and a listing of the cities and corresponding countries in North America (USA, Canada, Mexico) where they have a customer base. [3 pts]

>SELECT customer_base * FROM customer WHERE countries=NorthAmerica, USA, Canada, Mexico

*A listing of the product names and its corresponding category for products from suppliers based in Germany and France. [4 pts]

>SELECT product_names, product_id, price FROM product where country== Germany, France;

*A list of countries outside of North America (i.e. USA, Canada, Mexico) where they have less than 3 suppliers. [4 pts]

>SELECT countries *FROM suppliers WHERE count>3

*For OrderIDs 10258, 10259, and 10260, a listing of the corresponding customer, employee who accepted the order, and the shipper. The listed must be sorted alphabetically by customer name. [5 pts]

>SELECT customer_id, employee_id FROM supplier, customer WHERE order.employee=10258,10259,10260 && order.customer== 10258,10259,10260;

* A listing of the product names and supplier names for all products that make up OrderIDs 10254 and 10260.

>SELECT customer_id, employee_id, customer_name, supplier_name FROM supplier, customer WHERE order.employee=10254,10260 && order.customer==10254,10260;

NOTE: here I assumed the table names and column names and gave answer accordingly if you have different names in your database then you need to change the names and use the syntax as it is.


Related Solutions

Suppose that the shareholders can hire a board of directors to monitor the CEO. The board...
Suppose that the shareholders can hire a board of directors to monitor the CEO. The board of directors cannot perfectly monitor the effort level of the CEO, but hiring the board of directors increases the chance that they observe the true effort level of the CEO. The cost of hiring the board of directors to the shareholders is z. If hired, the board of directors will observe the effort level of the CEO with probability ½. Assume that the CEO...
You were recently appointed to the board of directors for Dropbox. a. What are the main...
You were recently appointed to the board of directors for Dropbox. a. What are the main responsibilities of the board of directors? b. Suppose that Microsoft just approached Dropbox about acquiring it. You and the board decide to ght this takeover attempt. What tools could you use to deter Microsoft? c. How does the Sarbanes-Oxley Act and the Dodd-Frank Act affect the board of directors at Dropbox? d. Suppose that an activist investor at Dropbox is attempting to remove the...
. The board of directors of a medium-sized corporation, ABC Inc, has appointed you as the...
. The board of directors of a medium-sized corporation, ABC Inc, has appointed you as the Interim Chief Executive Officer. The company has had a stellar year reporting record high revenues and earnings per share that exceeded Wall Street analysts' expectation. However, the share price of your company has fallen. As Interim CEO, discuss some of the factors that may be contributing to this effect and what are some of the things you will do as CEO to rejuvenate the...
Two proposals for manufacturing a new product have been proposed to the board of directors of...
Two proposals for manufacturing a new product have been proposed to the board of directors of ‘Salamis’ Ltd. Market research indicates that there is strong demand for the product. Proposal 1: The company will acquire plant costing £900,000. Fixed expenses (other than depreciation) would amount to £570,000 per annum and variable expenses per unit would be £350. Proposal 2: The company will acquire plant costing £800,000. Fixed expenses (other than depreciation) would amount to £240,000 per annum and variable expenses...
The CEO of a 400-bed hospital has scheduled a board of directors meeting to discuss the...
The CEO of a 400-bed hospital has scheduled a board of directors meeting to discuss the current financial situation of the hospital and steps that need to be done to correct some current problems. The CFO needs to send each board member an explanation of the financial statements that they will be discussing. You are the Director of Finance and he has asked you to put together a memo, explaining each statement. Do the following: Provide a copy of the...
How does a Board of Directors align the interests of CEO/shareholders and other stakeholders given the...
How does a Board of Directors align the interests of CEO/shareholders and other stakeholders given the legally the #1 role of the BOD is to make a profit for the owners or shareholders?
1-Which of the following controls a corporation? Chief executive officer (CEO) Board of directors Chief financial...
1-Which of the following controls a corporation? Chief executive officer (CEO) Board of directors Chief financial officer (CFO) None of these choices are correct. 2-All of the following are considered advantages of the corporate form of business EXCEPT limited liability. double taxation. continuous life. separate legal existence. 3- A journal entry to record the issuance of preferred stock at a premium would include a __________ to __________. credit; Cash debit; Paid-In Capital in Excess of Par debit; Preferred Stock credit;...
The directors of Surface Investment Limited have appointed you as their financial consultant. They are seeking...
The directors of Surface Investment Limited have appointed you as their financial consultant. They are seeking new project investments and require you to calculate the present cost of capital of the company. The capital structure is listed below:-  2 million ordinary shares, with a par value of 50 cents each, currently trading at R4 per share. The company has a beta (ß) of 1.4, a risk free (Rf) rate of 9% and a return on the market (Rm) of...
You have been appointed as a financial consultant by the directors of Adine Holdings. They require...
You have been appointed as a financial consultant by the directors of Adine Holdings. They require you to calculate the cost of capital of the company. The following information is available on the capital structure of the company:  1 500 000 Ordinary shares, with a market price of R3 per share. The latest dividend declared was 90 cents per share. A dividend growth of 13% was maintained for the past 5 years.  1 000 000 12%, R1 Preference...
Explain why it is important for the board of directors to have a mixture of executive...
Explain why it is important for the board of directors to have a mixture of executive and non-executive members.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT