Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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/
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.]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started