You have been asked to run a query using the CASE statement to analyze the quantity of shares data in the Order Transactions table. Specifically, you have been asked to determine the number of orders that fall into different order size ranges. There are 150 different orders in the Order Transactions table so if you add up the COUNT data in each of your buckets, you should get 150. You are asked to use five buckets: 1. 0-100, 2. 101-400, 3. 401-800, 4. 801-1000, and 5. 1001 or above. Since these are no order sizes above 1000 shares, you will have to think outside the box to figure out how to include "5. 1001 and Above" in your results table with zero (0) as the COUNT of orders in that bucket. You do not need to use RowNum for any part of this query. Provide working code in Oracle.
You have been asked to run a query using the CASE statement to analyze the quantity of shares data in the Order Transactions table. Specifically, you have been asked to determine the number of orders that fall into different order size ranges. There are 150 different orders in the Order Transactions table so if you add up the COUNT data in each of your buckets, you should get 150. You are asked to use five buckets: 1. 0-100, 2. 101-400, 3. 401-800, 4. 801-1000, and 5. 1001 or above. Since these are no order sizes above 1000 shares, you will have to think outside the box to figure out how to include "5. 1001 and Above" in your results table with zero (0) as the COUNT of orders in that bucket. You do not need to use RowNum for any part of this query. Provide working code in Oracle.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps