-- Create Table Statement for 'Merchant Statement Statistics'
DROP TABLE IF EXISTS `IAPP_MERCHANT_STATEMENT_STATISTICS`;
CREATE TABLE `IAPP_MERCHANT_STATEMENT_STATISTICS` (
	ID bigint(20) NOT NULL,
	MERCHANT_ACCOUNT_CODE int(11),
	MERCHANT_ACCOUNT_GROUP_CODE bigint(20),
	PORTFOLIO_CODE int(11),
	PERIOD varchar,
	NET_BALANCE int(11),
	RETURNS_BALANCE int(11),
	RECURRING_FEES_AMOUNT int(11),
	PROCESSING_FEES_AMOUNT int(11),
	PROCESSING_COST_AMOUNT int(11),
	FLAT_FEES_AMOUNT int(11),
	TOTAL_FEES_AMOUNT int(11),
	PROCESSOR_COST_AMOUNT int(11),
	RESELLER_COMMISSIONS_AMOUNT int(11),
	REFUNDS_RESERVE_REQUIRED_AMOUNT int(11),
	REFUNDS_RESERVE_BALANCE int(11),
	RETURNS_RESERVE_RATE int(11),
	RETURNS_RESERVE_REQUIRED_AMOUNT int(11),
	RETURNS_RESERVE_BALANCE int(11),
	CHARGEBACKS_RESERVE_RATE int(11),
	CHARGEBACKS_RESERVE_REQUIRED_AMOUNT int(11),
	CHARGEBACKS_RESERVE_BALANCE int(11),
	DEDUCTIONS_COUNT int(11),
	DEDUCTIONS_AMOUNT int(11),
	WITHDRAWALS_COUNT int(11),
	WITHDRAWALS_AMOUNT int(11),
	REMITTANCES_COUNT int(11),
	REMITTANCES_AMOUNT int(11),
	RETURNS_COUNT int(11),
	RETURNS_AMOUNT int(11),
	MERCHANT_FEE_REIMBURSEMENT_COUNT int(11),
	MERCHANT_FEE_REIMBURSEMENT_AMOUNT int(11),
	MERCHANT_FEE_WRITEOFF_COUNT int(11),
	MERCHANT_FEE_WRITEOFF_AMOUNT int(11),
	MERCHANT_BALANCE_WRITEOFF_COUNT int(11),
	MERCHANT_BALANCE_WRITEOFF_AMOUNT int(11),
	DEACTIVATE_DATE datetime,
	ADVANCES_COUNT int(11),
	ADVANCES_AMOUNT int(11),
	PREV_BALANCE int(11),
	NET_BALANCE bigint(20),
	RETURNS_BALANCE bigint(20),
	DEDUCTIONS_AMOUNT bigint(20),
	WITHDRAWALS_AMOUNT bigint(20),
	REMITTANCES_AMOUNT bigint(20),
	RETURNS_AMOUNT bigint(20),
	MERCHANT_FEE_REIMBURSEMENT_AMOUNT bigint(20),
	MERCHANT_FEE_WRITEOFF_AMOUNT bigint(20),
	MERCHANT_BALANCE_WRITEOFF_AMOUNT bigint(20),
	ADVANCES_AMOUNT bigint(20),
	PREV_BALANCE bigint(20),
	PRIMARY KEY (ID)
) ENGINE=InnoDB;