Assignment DB SQL Officesupply
Assignment DB SQL Officesupply
Read the brief case below. Using Oracle Application Express, complete the questions.
Downtown Office supply is a small family owned store in a small suburb. In order to
maintain and grow the business the owners want to do some analysis to see how their
sales are doing. Management wants to see how the company did last year and make
some decisions about what products to keep along with staffing for busy times of the
year.
Instructions:
1. Visit Oracle Live SQL - https://livesql.oracle.com
2. Create an account and login. The account should be created using your UTD
email address.
3. Click on “My Scripts” on the left menu.
4. Upload the “OfficeSupply.sql” script by clicking the upload Script button in the
upper right corner.
Respond to the questions below. Paste the query and a screenshot of the result for each of
the questions. Take the Screenshot in a way that the Username is captured. For example:
1. List all the different product categories and sub categories in alphabetical order, list
only the product category and product subcategory. Sort by the product
subcategory.
2. How many ORDERS had a CRITICAL order_priority? [Hint: you will use the function
COUNT(*) ]
3. Display the order date and the ship date for all orders that were made April 1 through
April 15. List the order date, ship date, order priority, and ship mode. Order the
results by order_date. Do you notice anything unusual about the data? [Hint: You will
need to join the orders and shipping together and use a join statement. You will
need to limit the result set by the date field order_date <= to_date('04/15/2018',
'mm/dd/yyyy'). ]
4. How much sales and profit was made from the sales of COMPUTER PERIPHERALS
(Prod_8)? [Hint: you will use the SUM function you will need a WHERE clause to
filter the rows].
5. List the sales, order_quantity, and profit for all products in the TECHNOLOGY
category. Display the product sub category name, the sales, order quantity, and
profit. Order by the product sub category name. [Hint: you will need to join the
market and product tables together and filter the rows by product category. You will
also need an ORDER BY clause].