Group 3 - Final Project Document

Embed Size (px)

DESCRIPTION

Data Warehousing / Oracle Database Module Final Project

Citation preview

  • GROUP 3 By: Jonathan Carvalho

    Randy Naraine Jeffrey Tan Mara Velez

    CST 4704 Final Project

    Data Warehouse for International Inc.

  • Business Processes

    1) Customers This process is used to track the guests of the hotel.

    2) Maintenance- This process maintains the equipment of the hotel.

    3) Inventory This process audits the equipment needed and identifying what the hotel currently has on

    hand.

    4) Retail This process is used for sales of products within the hotel.

    5) Employees This process is used to track the hotels current employees.

    6) Services - This includes the rooms currently in use or available for our customers and room service for

    dinning.

    7) Wholesale Vendors - This tracks equipment purchased from other companies in order to run the hotel

    successfully.

    Executive Reports

    1. An executive requires a report to display all of the items in stock in the hotel (which are sold by our in-

    house retailers) as well as the wholesale costs and margins (via as AS statement in our SQL). This will

    be used to visualize and evaluate trends in vendor pricing so we can adjust the markup on various

    items that are in high slow but slow moving, and create initiative for sale promotions.

    2. Executives would want to know the dates/seasons that result in the most check-ins, and the customer

    information for the most number of check-ins. This would be used to form a basis for a loyalty and

    rewards program, and see if the retention rate would increase.

    3. Executive would list outstanding products (that were ordered and not delivered within a 20 day

    timeframe.) This would be used to prune vendors and determine alternative solutions to resolve the

    demand/vendor issues.

    4. Executives must know the fluctuation attendance rates for and spring break, in our hotel chains for the

    analysis of margin shifts in room prices.

    5. Executives need to know inventory reports for such items as Eyewear, Glassware, etc. To know when

    to restock and adjust margins. This can be produced in a flexible manner via SQL pulling from our

    warehouse.

    6. Executives require to know the status of our vendor contracts, in which we will create a statement to

    show which vendors whom have less than 5 days remaining in their lease.

    7. Executives need to know the status of our service contracts, and we can create a statement to show

    which vendors have less than 10 days remaining in their contract end date, and display the rep

    information for contact.

    8. Executives will need to know employee information for employees who have has the longest tenure

    and also have a salary greater than $40000 and benefits are given.

    9. Executives request to see the on-hand quantity of inventory and sorted by date, alphabetically, type,

    and level. This is needed to express this information to different departments that deal with inventory

    (stock workers, managers, employees, etc.)

  • 10. Executives request a list of regular customers who have not checked in for an extended period of time,

    which would fall within 30 days in order to send them a promotional message.

    Value Chain

  • Bus Matrix

    Bus Processes Date Product Inventory Customer Vendor Payroll Personal Benefits Maintenance Contract Services

    Customers

    Maintenance

    Inventory

    Retail

    Employees

    Services

    Vendors

  • Metadata Chart Customers Dimension

    Field Data Type Data Size Null/Not Null PK

    CustomerID INTEGER Not Null PK

    First_Name VARCHAR 25 Not Null

    Last_Name VARCHAR 25 Not Null

    Address VARCHAR 50 Not Null

    City VARCHAR 20 Not Null

    State CHAR 2 Not Null

    Zip_Code NUMERIC 5 Not Null

    Email VARCHAR 30 Null

    Phone CHAR 10 Null

    Cust_Date DATE Not Null

    SKU_Num INTEGER Not Null

    Product_Name VARCHAR 30 Not Null

    Description VARCHAR 50 Not Null

    Price NUMERIC 3,2 Not Null

    Category VARCHAR 20 Not Null

    Vendor_Name VARCHAR 20 Not Null

  • Inventory/Retail Dimension

    Field Data Type Data Size Null/Not Null PK

    SKU_Num INTEGER Not Null PK

    Product_Name VARCHAR 30 Not Null

    Description VARCHAR 50 Not Null

    Price NUMERIC 3,2 Not Null

    Vendor VARCHAR 20 Not Null

    Inv_Date DATE Not Null

    Qty_On_Hand INTEGER Null

    Qty_On_Order INTEGER Null

    Backorder INTEGER Null

    Wholesale INTEGER Not Null

    Date_Ordered DATE Not Null

    Qty_Ordered INTEGER Not Null

    Employees Dimension

    Field Data Type Data Size Null/Not Null PK

    EmpID INTEGER Not Null PK

    First_Name VARCHAR 25 Not Null

    Last_Name VARCHAR 25 Not Null

    Address VARCHAR 50 Not Null

    City VARCHAR 20 Not Null

    State CHAR 2 Not Null

    Zip_Code CHAR 5 Not Null

    Email VARCHAR 25 Null

    Phone CHAR 10 Null

    Benefits VARCHAR 25 Null

    Department VARCHAR 25 Not Null

    Job_Title VARCHAR 25 Not Null

    Salary NUMERIC 7,0 Not Null

    Start_Date DATE Not Null

  • Services/Maintenance Dimension

    Field Data Type Data Size Null/Not Null PK

    Contract_ID INTEGER Not Null PK

    Description VARCHAR 25 Not Null

    Service_Rep VARCHAR 25 Not Null

    Service_Tel CHAR 10 Not Null

    Contract_Start DATE Not Null

    Contract_End DATE Not Null

    Inventory VARCHAR 25 Not Null

    Equipment VARCHAR 25 Not Null

    Service_Date DATE Not Null

    Vendors Dimension

    Field Data Type Data Size Null/Not Null PK

    VendorID INTEGER Not Null PK

    Vendor_Name VARCHAR 30 Not Null

    Address VARCHAR 40 Not Null

    City VARCHAR 20 Not Null

    State CHAR 2 Not Null

    Zip_Code CHAR 5 Not Null

    Phone CHAR 10 Not Null

    SKU_Num INTEGER Not Null

    Product_Name VARCHAR 30 Not Null

    Description VARCHAR 50 Not Null

    Price NUMERIC 3,2 Not Null

    Category VARCHAR 20 Not Null

  • Star Join Schema

    Customers Dimension

    Customer_ID (PK)

    Sales Fact Table

    Customer_ID (FK)

    SKU_Num (FK)

    Emp_ID (FK)

    Contract_ID (FK)

    Vendor_ID (FK)

    Total_Sales_Feb_2014

    Total_Sales_March_2014

    Total_Cost_Shipping_2013

    Total_Cost_Shipping_2014

    Inventory Dimension

    SKU_Num (PK) Employees Dimension

    Emp_ID (PK)

    Vendors Dimension

    Vendor_ID (PK)

    Services-Maintenance Dimension

    Contract_ID (PK)

  • Data Warehouse Design Steps 1) Step One: Identifying the Business Process

    The first step of designing a Data Warehouse is identifying the business processes. A process is a natural business activity that is performed in an organization that is typically supported by a source data system or systems. Although, a business process is not considered a business department. Business processes are typically an organization wide activity. It is recommended to build the Data Warehouse based on the business processes in the company rather than departments. With International Hotel Inc. the business processes that weve identified are customers of the hotel, maintenance of equipment, inventory on hand, retail sales, employees, services of the hotel, and vendors of hotel equipment.

    2) Step Two: Define the Grain of the Business

    The second step, we are required to specify what exactly is represented in one row of our fact table. International Hotel Inc. will monitor the items in stock of the hotel, the amount of check-ins during a period of time, products not delivered within a specific timeframe, fluctuations of attendance, inventory reports of their retail sales, vendor and service contracts, employee information, on hand quantity of products, and a list of regular customers whom have not been attending.

    3) Step Three: Choose the Dimension

    In this step, we need to identify all the specific and detailed data that will then represent the user requesting the data with information used for analysis and reporting. This is vital when identifying trends within an organization For International Hotel Inc. we have identified five dimensions. Our customers dimension includes information of current customers such as their name, address, phone, email, a unique customer ID, as well as the service or product theyve ordered. With our inventory/retail dimension, it is detailed with the SKU#, the product, price, as well as information of the quantity the hotel has on hand and information of the order. The employees dimension includes basic information such as their name, address, email, phone, a unique employee id, as well as their job title, benefits, and salary. Our services/maintenance dimension includes a contract id, the service representative, and information on the contract. Lastly, our Vendors dimension includes the Vendor ID, their address, and product information.

    4) Step Four: Identify the Fact Table

    The fourth step involves designing the data warehouse and quantitative data that will need to be identified for analyzing and reporting. This is necessary for businesses that rely on statistics and their sales. International Hotel Inc.s fact table lists information of their sales of rooms and retail items for specific months, shipping costs, and promotional numbers.

  • Create Statements Customers Dimension

    CREATE TABLE Customers ( CustomerID INTEGER NOT NULL , First_Name VARCHAR2 (25) , Last_Name VARCHAR2 (25) , Address VARCHAR2 (40) , City VARCHAR (20) , State CHAR (2) , Zip_Code CHAR (5) , Email VARCHAR2 (40) , Phone CHAR (10) , cust_Date DATE , SKU_Num INTEGER , Product_Name VARCHAR2 (30) , Description VARCHAR2 (50) , Price INTEGER , Category VARCHAR2 (20) , Vendor_Name VARCHAR2 (20) ) LOGGING ; ALTER TABLE Customers ADD CONSTRAINT DimCustomers_PK PRIMARY KEY ( CustomerID ) ;

    Employees Dimension

    CREATE TABLE Employees ( EmpID INTEGER NOT NULL , First_Name VARCHAR2 (25) , Last_Name VARCHAR2 (25) , Address VARCHAR2 (50) , City VARCHAR (20) , State CHAR (2) , Zip_Code CHAR (5) , Email VARCHAR2 (25) , Phone CHAR (10) , Benefits VARCHAR2 (25) , Department VARCHAR2 (25) , Job_Title VARCHAR2 (25) , Salary NUMBER Start_Date DATE ) LOGGING ; ALTER TABLE Employees ADD CONSTRAINT DimEmployees_PK PRIMARY KEY ( EmpID ) ;

  • Sales Fact Table

    CREATE TABLE FactTable ( VendorID INTEGER NOT NULL , CustomerID INTEGER NOT NULL , EmpID INTEGER NOT NULL , SKU_Num INTEGER NOT NULL , Contact_ID INTEGER NOT NULL , Total_Sales INTEGER ) LOGGING ; ALTER TABLE FactTable ADD CONSTRAINT Relation_10 FOREIGN KEY ( SKU_Num ) REFERENCES Inventory ( SKU_Num ) NOT DEFERRABLE ; ALTER TABLE FactTable ADD CONSTRAINT Relation_11 FOREIGN KEY ( Contact_ID ) REFERENCES "Serv-Maintain" ( Contact_ID ) NOT DEFERRABLE ; ALTER TABLE FactTable ADD CONSTRAINT Relation_6 FOREIGN KEY ( VendorID ) REFERENCES Vendors ( VendorID ) NOT DEFERRABLE ; ALTER TABLE FactTable ADD CONSTRAINT Relation_7 FOREIGN KEY ( CustomerID ) REFERENCES Customers ( CustomerID ) NOT DEFERRABLE ; ALTER TABLE FactTable ADD CONSTRAINT Relation_8 FOREIGN KEY ( EmpID ) REFERENCES Employees ( EmpID ) NOT DEFERRABLE ;

  • Inventory Dimension

    CREATE TABLE Inventory ( SKU_Num INTEGER NOT NULL , Product_Name VARCHAR2 (30) , Description VARCHAR2 (50) , Price INTEGER , Category VARCHAR2 (20) , Vendor VARCHAR2 (20) , inv_Date DATE , Qty_On_Hand INTEGER , Qty_On_Order INTEGER , Backorder INTEGER Wholesale INTEGER Date_Ordered DATE Qty_Ordered INTEGER ) LOGGING ; ALTER TABLE Inventory ADD CONSTRAINT DimInvRetail_PK PRIMARY KEY ( SKU_Num ) ;

    Service-Maintenance Dimension

    CREATE TABLE "Serv-Maintain" ( Contact_ID INTEGER NOT NULL , Description VARCHAR2 (25) , Service_Rep VARCHAR2 (25) , Service_Tel CHAR (10) , Contract_Start DATE , Contract_End DATE , Inventory VARCHAR2 (25) , Equipment VARCHAR2 (25) , service_Date DATE ) LOGGING ; ALTER TABLE "Serv-Maintain" ADD CONSTRAINT DimServMaintain_PK PRIMARY KEY ( Contact_ID ) ;

    Vendors Dimension

    CREATE TABLE Vendors ( VendorID INTEGER NOT NULL , Vendor_Name VARCHAR2 (30) , Address VARCHAR2 (40) , City VARCHAR (20) , State CHAR (2) , Zip_Code CHAR (5) , Email VARCHAR2 (40) , Phone CHAR (10) , SKU_Num INTEGER , Product_Name VARCHAR2 (30) , Description VARCHAR2 (30) , Price INTEGER , Category VARCHAR2 (20) ) LOGGING ; ALTER TABLE Vendors ADD CONSTRAINT DimVendors_PK PRIMARY KEY ( VendorID ) ;

  • Insert Statements

    Customers

    INSERT INTO "JT3174"."CUSTOMERS" (CUSTOMERID, FIRST_NAME, LAST_NAME, ADDRESS, STATE, ZIP_CODE, EMAIL, PHONE, CUST_DATE, SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, CITY) VALUES ('678924', 'Jessica', 'Moss', '536 Swick Hill Street', 'LA', '70113', '[email protected]', '9852535179', TO_DATE('21-JUN-08', 'DD-MON-RR'), '54096814', 'Suite room', 'Equipped with multiple bedrooms and bathrooms', '200', 'Room', 'New Orleans'); INSERT INTO "JT3174"."CUSTOMERS" (CUSTOMERID, FIRST_NAME, LAST_NAME, ADDRESS, STATE, ZIP_CODE, EMAIL, PHONE, CUST_DATE, SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, VENDOR_NAME, CITY) VALUES ('612331', 'Neoma', 'Carlson', '4463 Sussex Court', 'TX', '76701', '[email protected]', '2545488818', TO_DATE('23-JUL-14', 'DD-MON-RR'), '44718256', 'Postcard', 'Souviener memory of hotel', '10', 'Souvenir', 'ABC Inc.', 'Waco'); INSERT INTO "JT3174"."CUSTOMERS" (CUSTOMERID, FIRST_NAME, LAST_NAME, ADDRESS, STATE, ZIP_CODE, EMAIL, PHONE, CUST_DATE, SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, CITY) VALUES ('716235', 'Christian', 'Mitchell', '3915 Hilltop Haven Drive', 'NJ', '07102', '[email protected]', '9737745646', TO_DATE('3-FEB-13', 'DD-MON-RR'), '73194120', 'Standard room', 'Equipped with one bedroom and bathroom', '50', Room, 'Newark');

    Employees

    INSERT INTO "JT3174"."EMPLOYEES" (EMPID, FIRST_NAME, LAST_NAME, ADDRESS, STATE, ZIP_CODE, EMAIL, PHONE, BENEFITS, DEPARTMENT, JOB_TITLE, SALARY, CITY) VALUES ('561234', 'Gladys', 'Mohamed', '4965 Bruce Street', 'MO', '63101', '[email protected]', '3143460894', 'Health and Dental', 'Hotel Staff', 'Innkeeper', '35000', 'St. Louis'); INSERT INTO "JT3174"."EMPLOYEES" (EMPID, FIRST_NAME, LAST_NAME, ADDRESS, STATE, ZIP_CODE, EMAIL, PHONE, BENEFITS, DEPARTMENT, JOB_TITLE, SALARY, CITY) VALUES ('147621', 'John', 'Elias', '406 Caynor Circle', 'NJ', '07662', '[email protected]', '9085287781', 'Vision Health and Dental', 'Hotel staff', 'Supervisor', '60000', 'Newark'); INSERT INTO "JT3174"."EMPLOYEES" (EMPID, FIRST_NAME, LAST_NAME, ADDRESS, STATE, ZIP_CODE, EMAIL, PHONE, BENEFITS, DEPARTMENT, JOB_TITLE, SALARY, CITY) VALUES ('512462', 'Juan', 'Lind', '4342 Sand Fork Road', 'IN', '46947', '[email protected]', '5747399332', 'Health, Hotel staff', 'Hotel staff', 'Janitor', '20000', 'South Bend');

    Inventory

    INSERT INTO "JT3174"."INVENTORY" (SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, VENDOR, INV_DATE, QTY_ON_HAND, QTY_ON_ORDER, BACKORDER) VALUES ('12161356', 'Sunglasses', 'Polarized sunglasses', '30', 'Eyewear', 'Oakley', TO_DATE('06-JUL-10', 'DD-MON-RR'), '50', '0', '0'); INSERT INTO "JT3174"."INVENTORY" (SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, VENDOR, INV_DATE, QTY_ON_HAND, QTY_ON_ORDER, BACKORDER) VALUES ('44718256', 'Postcard', 'Souviener memory of hotel', '10', 'Souvenir', 'ABC Inc.', TO_DATE('23-JUL-14', 'DD-MON-RR'), '20', '100', '30'); INSERT INTO "JT3174"."INVENTORY" (SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, VENDOR, INV_DATE, QTY_ON_HAND, QTY_ON_ORDER, BACKORDER) VALUES ('51234125', 'T-Shirt', 'Cotton', '20', 'Clothing', 'Fruit of the Loom', TO_DATE('15-AUG-13', 'DD-MON-RR'), '15', '200', '15'); INSERT INTO "JT3174"."INVENTORY" (SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, VENDOR, INV_DATE, QTY_ON_HAND, QTY_ON_ORDER, BACKORDER) VALUES ('71235614', 'Swimming goggles', 'Visibility underwater', '30', 'Eyewear', 'OceanView', TO_DATE('11-SEP-14', 'DD-MON-RR'), '20', '30', '55'); INSERT INTO "JT3174"."INVENTORY" (SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, VENDOR, INV_DATE, QTY_ON_HAND, QTY_ON_ORDER, BACKORDER) VALUES ('57123511', 'Water Flask', 'Container for liquids', '50', 'Beverages', 'WaterFlash Corp', TO_DATE('19-DEC-10', 'DD-MON-RR'), '10', '20', '0');

  • Service-Maintenance

    INSERT INTO "JT3174"."Serv-Maintain" (CONTACT_ID, DESCRIPTION, SERVICE_REP, SERVICE_TEL, CONTRACT_START, CONTRACT_END, INVENTORY, EQUIPMENT, SERVICE_DATE) VALUES ('4123596283', 'Restoration of bathroom', 'Donald M. Atkins', '3367850745', TO_DATE('12-JAN-13', 'DD-MON-RR'), TO_DATE('28-FEB-13', 'DD-MON-RR'), 'Nails', 'Hammer and drill', TO_DATE('14-JAN-13', 'DD-MON-RR')); INSERT INTO "JT3174"."Serv-Maintain" (CONTACT_ID, DESCRIPTION, SERVICE_REP, SERVICE_TEL, CONTRACT_START, CONTRACT_END, INVENTORY, EQUIPMENT, SERVICE_DATE) VALUES ('2461235732', 'Network maintenance', 'Joshua Vallo', '3123512346', TO_DATE('15-SEP-12', 'DD-MON-RR'), TO_DATE('16-SEP-12', 'DD-MON-RR'), 'Computers', 'Software and cabling', TO_DATE('15-SEP-12', 'DD-MON-RR')); INSERT INTO "JT3174"."Serv-Maintain" (CONTACT_ID, DESCRIPTION, SERVICE_REP, SERVICE_TEL, CONTRACT_START, CONTRACT_END, INVENTORY, EQUIPMENT, SERVICE_DATE) VALUES ('1256123962', 'Elevator maintenance', 'John Garcia', '1241239191', TO_DATE('01-DEC-13', 'DD-MON-RR'), TO_DATE('10-DEC-13', 'DD-MON-RR'), 'Elevators', 'Toolkits and wiring', TO_DATE('02-DEC-13', 'DD-MON-RR'));

    Vendors

    INSERT INTO "JT3174"."VENDORS" (VENDORID, VENDOR_NAME, ADDRESS, STATE, ZIP_CODE, EMAIL, PHONE, SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, CITY) VALUES ('5515610294', 'Oakley', '1919 New York Avenue', 'CA', '92801', '[email protected]', '8182306707', '12161356', 'Sunglasses', 'Polarized sunglasses', '30', 'Eyewear', 'New Orleans'); INSERT INTO "JT3174"."VENDORS" (VENDORID, VENDOR_NAME, ADDRESS, STATE, ZIP_CODE, EMAIL, PHONE, SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, CITY) VALUES ('5123681249', 'Fruit of the Loom', '4461 Chandler Drive', 'MO', '65806', '[email protected]', '4175949478', '12171344', 'T-shirt', 'Cotton Shirt', '20', 'Clothing', 'Springfield'); INSERT INTO "JT3174"."VENDORS" (VENDORID, VENDOR_NAME, ADDRESS, STATE, ZIP_CODE, EMAIL, PHONE, SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, CATEGORY, CITY) VALUES ('4512910275', 'WaterFlask Corp', '2860 Briarwood Drive', 'NJ', '08070', '[email protected]', '8565401651', '72171323', 'Water Flask', 'Container for liquids', '50', 'Beverages', 'Pennsville');

    Outrigger

    CREATE TABLE AVEDA ( Category_ID INTEGER NOT NULL , Product_Category VARCHAR2 (15 CHAR) , Product_Description VARCHAR2 (15 CHAR) , Product_Sub_Cat VARCHAR2 (15 CHAR) ) ; ALTER TABLE AVEDA ADD CONSTRAINT "AVEDA PK" PRIMARY KEY ( Category_ID ) ;

  • SQL Statements

    An executive requires a report to display all of the items in stock in the hotel (which are sold by our in-house retailers) as well as the wholesale costs and margins (via as AS statement in our SQL). This will be used to visualize and evaluate trends in vendor pricing so we can adjust the markup on various items that are in high slow but slow moving, and create initiative for sale promotions.

    SELECT SKU_NUM, PRODUCT_NAME, PRICE, (100 * (PRICE - WHOLESALE)) / PRICE AS MARGIN FROM INVENTORY ORDER BY MARGIN DESC

    Executive would a list of outstanding products (that were ordered and not delivered within a 20 day timeframe.) This would be used to prune vendors and determine the ways to resolve demand/vendor issues.

    SELECT SKU_NUM AS SKU, PRODUCT_NAME AS PRODUCT, DESCRIPTION, PRICE, INV_DATE, DATE_ORDERED, BACKORDER, INV_DATE - DATE_ORDERED AS OUTSTANDING FROM INVENTORY WHERE INV_DATE - DATE_ORDERED > 20 ORDER BY OUTSTANDING DESC;

  • Executives would want to know the dates/seasons that result in the most check-ins, and the customer information for the most number of check-ins (for example in April due to spring break). This would be used to form a basis for a loyalty and rewards program, and see if the retention rate would increase.

    SELECT CUSTOMERID, FIRST_NAME, LAST_NAME, PHONE, EMAIL, CUST_DATE, PRODUCT_NAME, DESCRIPTION FROM CUSTOMERS WHERE PRODUCT_NAME LIKE 'RM%' AND CUST_DATE BETWEEN TO_DATE('01-APR-13') AND TO_DATE('30-APR-13') ORDER BY LAST_NAME;

    Executives would want to know the fluctuation attendance rates for and spring break (April 14 to April 18), in our hotel chains for the analysis of margin shifts in room prices.

    SELECT CUSTOMERID, FIRST_NAME, LAST_NAME, PHONE, EMAIL, CUST_DATE FROM CUSTOMERS WHERE CUST_DATE BETWEEN TO_DATE('14-APR-13') AND TO_DATE('18-APR-13');

  • Executives would want to know inventory reports for such items as Eyewear, Bath, Glassware, etc. To know when to restock and adjust margins, this can be produced in a flexible manner via SQL pulling from our warehouse.

    SELECT SKU_NUM, PRODUCT_NAME, QTY_ORDERED - QTY_ON_HAND AS UNITS_SOLD FROM INVENTORY WHERE CATEGORY = 'Bath' or CATEGORY = 'Eyewear' ORDER BY UNITS_SOLD DESC;

    Executives would want to know the status of our vendor contracts, we can create a statement to show which vendors have less than 5 days remaining in their lease.

    SELECT VENDORID, VENDOR_NAME AS VENDOR, ROUND((CONTRACT_DATE - SYSDATE)) AS DAYS_RENEWAL FROM VENDORS WHERE ROUND((CONTRACT_DATE - SYSDATE)) 25000 AND BENEFITS IS NOT NULL;

  • Executives would want to know employee information for employees who have has the longest tenure and also have a salary greater than $20000 and benefits are given.

    SELECT EMPID, LAST_NAME AS L_NAME, FIRST_NAME AS F_NAME, BENEFITS, SALARY, ROUND((SYSDATE - START_DATE)) AS TENURE FROM EMPLOYEES WHERE SALARY > 20000 AND BENEFITS IS NOT NULL ORDER BY L_NAME;

    Executives would like to see the on hand Quantity of Inventory that is sorted alphabetically, by date, by type, and by level. This is needed because of the need to express this information to different departments that deal with inventory (stock workers, managers etc).

    SELECT SKU_NUM, PRODUCT_NAME, DESCRIPTION, PRICE, INVENTORY.CATEGORY, VENDOR, INV_DATE, QTY_ON_HAND, QTY_ON_ORDER, BACKORDER FROM INVENTORY ORDER BY QTY_ON_HAND, CATEGORY;

  • Executives would want to know a list of regular customers who have not checked in for an extended period of time, which would fall within 30 days (between January 2013 and February 2013) so that the hotel may send them a promotional message.

    SELECT CUSTOMERID, FIRST_NAME, LAST_NAME, PHONE, EMAIL, CUST_DATE

    FROM CUSTOMERS

    WHERE CUST_DATE BETWEEN TO_DATE('01-JAN-13') AND TO_DATE('28-FEB-13');

    Dimension Screenshots

    Customers Dimension

    Employees Dimension

    Service-Maintenance Dimension

  • Vendors Dimension