Please write the SQL query in Oracle as followed: The database can be downloaded via: https://www.oracletutorial.com/wp-content/uploads/2019/01/oracle-sample-database.zip
Fantastic news! We've Found the answer you've been seeking!
Question:
Please write the SQL query in Oracle as followed:
The database can be downloaded via: https://www.oracletutorial.com/wp-content/uploads/2019/01/oracle-sample-database.zip
For more information, please visit the following page for details, UML class visualization, etc. : https://www.oracletutorial.com/getting-started/oracle-sample-database/
Transcribed Image Text:
Task 1.1: [1 Marks] Write one SQL query to list the region names and the number of countries for each region from the above database. Task 1.2: [1 Marks] Write one SQL query to find all customers who have made orders before 2016. List must include the customer ID, customer name, and ordered by their ID values in descending. Task 1.3: [1 Marks] Write one SQL query to list all customers who have the sequential letters 'co' in the customer name where the condition 'co' is case-insensitive, i.e., 'CO', 'Co', ... can also be retrieved. List must include the customers' ID, names and ordered by their names in ascending. Task 1.4: [1 Marks] Write one SQL query to list all products' ID, Name and price where the products haven't been purchased by any customer in the database. The list must be ordered by the product price. Task 1.5: [1 Marks] Write one SQL query to list the employees and the number of orders that each employee processed in the database. The output list must include employee ID, name, and the number of orders. The list must be sorted by the number of orders in the descending order. Task 1.6: [1 Marks] Write one SQL query to list all the warehouses and the revenue of each warehouse. Here, given a product, the revenue of the product is calculated by the sold quantity of the product and its List Price. The list must be ordered by the revenue value in the descending. [Reminder: if one product_ID links to more than one warehouses in the provided database, you can simply count it into its linked warehouses' revenue.] Task 1.1: [1 Marks] Write one SQL query to list the region names and the number of countries for each region from the above database. Task 1.2: [1 Marks] Write one SQL query to find all customers who have made orders before 2016. List must include the customer ID, customer name, and ordered by their ID values in descending. Task 1.3: [1 Marks] Write one SQL query to list all customers who have the sequential letters 'co' in the customer name where the condition 'co' is case-insensitive, i.e., 'CO', 'Co', ... can also be retrieved. List must include the customers' ID, names and ordered by their names in ascending. Task 1.4: [1 Marks] Write one SQL query to list all products' ID, Name and price where the products haven't been purchased by any customer in the database. The list must be ordered by the product price. Task 1.5: [1 Marks] Write one SQL query to list the employees and the number of orders that each employee processed in the database. The output list must include employee ID, name, and the number of orders. The list must be sorted by the number of orders in the descending order. Task 1.6: [1 Marks] Write one SQL query to list all the warehouses and the revenue of each warehouse. Here, given a product, the revenue of the product is calculated by the sold quantity of the product and its List Price. The list must be ordered by the revenue value in the descending. [Reminder: if one product_ID links to more than one warehouses in the provided database, you can simply count it into its linked warehouses' revenue.]
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
Book: *restoring-justice-an-introduction-to-restorative-justice-pdfdrive.pdf 1. What is the difference between Restorative Justice and the traditional criminal justice system in the United States? 2....
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Below is given an example design for a supermarket chain database design. For reference, both an ER-diagram and relational model description are included. Your task is to write SQL instructions to...
-
The electron affinity of oxygen is -141kJ/mol, corresponding to the reaction O (g) + e- O- (g) The lattice energy of K2O(s) is 2238kJ/mol. Use these data along with data in Appendix C and Figure 7.9...
-
Balance the following equations: (a) Be2C(s) + H2O(l) (b) CaC2(s) + H2O(l)
-
Consider the tube and inlet conditions of Problem 1.36. Heat transfer at a rate of q = 3.89 MW is delivered to the tube. For an exit pressure of p = 8 bar, determine (a) The temperature of the water...
-
Ratios Analyzing Long-Term Firm Solvency The following information is available for Rae Company: Calculate the following: a. 2019 debt-to-equity ratio b. 2019 times-interest-earned ratio c. 2019...
-
Assume that Rf = 5 percent and Km = 10.5 percent. Compute Kj for the following betas using Formula 11A-2. a. 0.6 b. 1.3 c. 1.9
-
Here are simplified financial statements for Phone Corporation in 2020: INCOME STATEMENT (Figures in $ millions) Net sales $ 13,700 Cost of goods sold 4,360 Other expenses 4,047 Depreciation 2,698...
-
Please complete the 2018 federal income tax return for Tim and Linda Jones. Ignore the requirement to attach the form(s) W-2 to the front page of the Form 1040. If required information is missing,...
-
A certain Einstein solid's entropy changes from 305.2 k B to 338.1 k B when we add 1 unit of energy. What is the value (and units) of k B T/ for this solid? If = 1.0 eV, what is its temperature T?
-
JetBlue is a major U.S. airline that ranked seventh in the U.S. in 2021 based on number of passengers carried. JetBlue has 270 aircraft and services 104 destinations. Consider three decisions below...
-
Consider again the ORION system discussed in problem 2. Is ORION an example of descriptive, predictive, or prescriptive analytics? Explain. Problem 2 Every day, logistics companies such as United...
-
Human resource (HR) analytics or people analytics are terms used for the use of analytics to manage a companys workforce. Google, Microsoft, and Walmart, for example, use people analytics to help...
-
At what phase of the product life cycle are the most organizations offering the product to the customer?
-
The product life cycle suggests that what will happen to the price of a product as it ages?
-
The Machine Tools Company (MTC) operates two divisions. The manufacturing division (Division M) is responsible for the manufacturing of Component X. The assembly division (Division A) uses component...
-
In the current year, the City of Omaha donates land worth $500,000 to Ace Corporation to induce it to locate in Omaha and create an estimated 2,000 jobs for its citizens. a. How much income, if any,...
-
Why do some standard SQL-92 statements fail to run successfully in Microsoft Access?
-
Explain the use of the terms file , record , and field .
-
Define the term metadata, and give some examples of metadata.
-
Presented below are selected financial data from the Bristol-Myers Squibb 2015 annual report. Using the ratio definitions from Exhibit 4.6, calculate the following ratios: receivable turnover,...
-
Presented below are selected financial data from the The Coca-Cola Company 2015 annual report. Using the ratio definitions from Exhibit 4.6, calculate the following ratios: receivable turnover,...
-
Presented below are selected financial data from The Boeing Company 2015 annual report. Using the ratio definitions from Exhibit 4.6, calculate the following ratios: receivable turnover, receivable...
Study smarter with the SolutionInn App