-- Create Table Statement for 'Merchant Activity Statistics'
DROP TABLE IF EXISTS `IAPP_MERCHANT_ACTIVITY_STATISTICS`;
CREATE TABLE `IAPP_MERCHANT_ACTIVITY_STATISTICS` (
	ID bigint(20) NOT NULL,
	CREATE_DATE datetime,
	MERCHANT_ACCOUNT_CODE int(11),
	EFFECTIVE_DATE datetime,
	INVOICE_COUNT int(11),
	TOTAL_INVOICE_AMOUNT int(11),
	CREDIT_COUNT int(11),
	TOTAL_CREDIT_AMOUNT int(11),
	CANCEL_CREDIT_COUNT int(11),
	TOTAL_CANCEL_CREDIT_AMOUNT int(11),
	VOID_PAYMENT_COUNT int(11),
	TOTAL_VOID_PAYMENT_AMOUNT int(11),
	CANCEL_REFUND_COUNT int(11),
	TOTAL_CANCEL_REFUND_AMOUNT int(11),
	CHARGEBACK_REVERSAL_COUNT int(11),
	TOTAL_CHARGEBACK_REVERSAL_AMOUNT int(11),
	SERVICE_FEE_COUNT int(11),
	TOTAL_SERVICE_FEE_AMOUNT int(11),
	LATE_FEE_COUNT int(11),
	TOTAL_LATE_FEE_AMOUNT int(11),
	ACCESS_FEE_COUNT int(11),
	TOTAL_ACCESS_FEE_AMOUNT int(11),
	WRITE_OFF_COUNT int(11),
	TOTAL_WRITE_OFF_AMOUNT int(11),
	SETTLEMENT_COUNT int(11),
	TOTAL_SETTLEMENT_AMOUNT int(11),
	PAYMENT_PLAN_COUNT int(11),
	TOTAL_PAYMENT_PLAN_AMOUNT int(11),
	SKIP_TRACE_COUNT int(11),
	CREDIT_AGENCY_TRANSACTION_COUNT int(11),
	LETTER_WELCOME_COUNT int(11),
	LETTER_SOFT_DECLINE_COUNT int(11),
	LETTER_HARD_DECLINE_COUNT int(11),
	LETTER_CHARGEBACK_COUNT int(11),
	LETTER_STATEMENT_COUNT int(11),
	LETTER_INVOICE_NOTIFICATION_COUNT int(11),
	LETTER_NOTIFICATION1_COUNT int(11),
	LETTER_NOTIFICATION2_COUNT int(11),
	LETTER_NOTIFICATION3_COUNT int(11),
	LETTER_COLLECTIONS1_COUNT int(11),
	LETTER_COLLECTIONS2_COUNT int(11),
	LETTER_COLLECTIONS3_COUNT int(11),
	LETTER_COLLECTIONS4_COUNT int(11),
	LETTER_COLLECTIONS5_COUNT int(11),
	LETTER_CUSTOM_COUNT int(11),
	LETTER_TOTAL_COUNT int(11),
	EMAIL_WELCOME_COUNT int(11),
	EMAIL_SOFT_DECLINE_COUNT int(11),
	EMAIL_HARD_DECLINE_COUNT int(11),
	EMAIL_CHARGEBACK_COUNT int(11),
	EMAIL_STATEMENT_COUNT int(11),
	EMAIL_INVOICE_NOTIFICATION_COUNT int(11),
	EMAIL_NOTIFICATION1_COUNT int(11),
	EMAIL_NOTIFICATION2_COUNT int(11),
	EMAIL_NOTIFICATION3_COUNT int(11),
	EMAIL_COLLECTIONS1_COUNT int(11),
	EMAIL_COLLECTIONS2_COUNT int(11),
	EMAIL_COLLECTIONS3_COUNT int(11),
	EMAIL_COLLECTIONS4_COUNT int(11),
	EMAIL_COLLECTIONS5_COUNT int(11),
	EMAIL_DRAFT_PAYMENT_COUNT int(11),
	EMAIL_AGENT_PAYMENT_COUNT int(11),
	EMAIL_PORTAL_PAYMENT_COUNT int(11),
	EMAIL_VOID_COUNT int(11),
	EMAIL_REFUND_COUNT int(11),
	EMAIL_INVOICE_COUNT int(11),
	EMAIL_CREDIT_COUNT int(11),
	EMAIL_CANCEL_CREDIT_COUNT int(11),
	EMAIL_CANCEL_REFUND_COUNT int(11),
	EMAIL_LATE_FEE_COUNT int(11),
	EMAIL_CUSTOM_COUNT int(11),
	EMAIL_TOTAL_COUNT int(11),
	SENT_COLLECTIONS_COUNT int(11),
	TOTAL_SENT_COLLECTIONS_AMOUNT int(11),
	REINSTATE_COUNT int(11),
	PHASE4_PAYMENT_COUNT int(11),
	TOTAL_PHASE4_PAYMENT_AMOUNT int(11),
	PHASE4_RETURN_COUNT int(11),
	TOTAL_PHASE4_RETURN_AMOUNT int(11),
	TOTAL_CANCELLED_FIXED_COUNT int(11),
	TOTAL_CANCELLED_FIXED_VALUE_AMOUNT int(11),
	TOTAL_CREATED_FIXED_COUNT int(11),
	TOTAL_CREATED_FIXED_VALUE_AMOUNT int(11),
	TOTAL_UPGRADED_FIXED_COUNT int(11),
	TOTAL_UPGRADED_FIXED_VALUE_AMOUNT int(11),
	PRIMARY KEY (ID)
) ENGINE=InnoDB;