Professional Documents
Culture Documents
Fastload
Multiload
TPump
BTEQ Import
Can you provide an example of when you would use each one?
Mortgage_Held_Indicator
CHAR(1)
Monthly_Debit_Count SMALLIN
T
Monthly_Debit_Balance DECIMAL
(15,2)
Account_Opened_Date
DATE
Account_Closed_Date
DATE
Customer_Surname VARCHA
R(15)
Customer_Initials
CHAR(1)
5. Given the following data-definition and sample data, can you please write a piece
of SQL that will determine the balance of an account at the end of January 2006 and
the end of February 2006, and output the data in the following format:
Sample-Data
Balance_ Balance_
Account_ Balance_ Start_ End_
Number Amount Date Date
------------ ------------ ------------- -------------
• Many queries that use this table will be looking to calculate the total balance
and net-interest-revenue for each customer per month.
• Many users will look to use the data above with additional customer attributes
from other customer tables that will be indexed on Customer-Identifier.
7. Using data from the tables below, write a piece of SQL that will work out for every
account in the ACCOUNTS_TABLE the number of credit and debit transactions per
account during September 2006.
Sample-data:
Average Average
Account Sort Summary Credit Debit
Number Code Date Balance Balance
--------- ------ ------------- ------------ -----------
12345678 404775 2006-09-30 123.30 0.00
23456789 404775 2006-09-30 0.00 -5.47
34567890 404775 2006-09-30 20.00 0.00
Sample Data:
Sample Data:
Output required:
12345678 404775 2 3
23456789 404775 0 4
34567890 404775 0 0
8. Give some examples of when you have or would use:
• Volatile tables
• Permanent tables
9. Given the following data definition:
Sample Data:
Write a piece of SQL to split the customers into Total_VAPM_Value decile bands.
Please make some recommendations about how the performance of queries against
the table could be improved.