Answered step by step
Verified Expert Solution
Question
1 Approved Answer
To calculate the Turnover and the Type of customers, follow the data preparation steps below: CREATE a table CUSTOMER_COPY by copying the CUSTOMER table. Add
To calculate the Turnover and the Type of customers, follow the data preparation steps below:
- CREATE a table CUSTOMER_COPY by copying the CUSTOMER table.
- Add a column TUROVER NUMBER (12, 2) to the CUSTOMER_COPY table.
- Write SQL correlated statements to populate the TUROVER column.
- Display the entire content of the CUSTOMER_COPY table.
- Add the column CUST_TYPE CHAR (1) to the CUSTOMER_COPY table.
To populate the column CUST_TYPE with the appropriate TYPE, follow the steps below:
- Implement a PL/SQL block using the IF and UPDATE statements to set the CUST_TYPE column value to A, B or C according to the rule explained above.
- Display the whole content of the CUSTOMER_COPY table.
- Display the number of customers, write it here.........
- Count the number of Customers by CUST_TYPE, write it below:
A B ..
C
- Check manually the number of customers is the total of customers of all types. Save your session as Lab4.sql, download and clean the script file.
Congratulations, you have prepared derived data you will use to load DW tables.
Lab Summary. Describe the main tasks you implemented, and the tips you learned, if any.
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