--V8_RFM_RESCOUNT_POINTS

DROP TABLE V8_RFM_RESCOUNT_POINTS CASCADE CONSTRAINTS;

CREATE MATERIALIZED VIEW LOG ON wuss WITH PRIMARY KEY;

CREATE MATERIALIZED VIEW LOG ON yres WITH PRIMARY KEY;

CREATE MATERIALIZED VIEW V8_RFM_RESCOUNT_POINTS REFRESH ON DEMAND AS SELECT * FROM V8_STATS_RFM_RESCOUNT_POINTS;

CREATE INDEX v8_rfm_rescount_points001 ON V8_RFM_RESCOUNT_POINTS(XCMS_ID) TABLESPACE v8index;


-- V8_RFM_LASTDEP_POINTS

DROP TABLE V8_RFM_LASTDEP_POINTS CASCADE CONSTRAINTS;

CREATE MATERIALIZED VIEW V8_RFM_LASTDEP_POINTS REFRESH ON DEMAND AS SELECT * FROM V8_STATS_RFM_LASTDEP_POINTS;

CREATE INDEX v8_rfm_lastdep_points001 ON V8_RFM_LASTDEP_POINTS(XCMS_ID) TABLESPACE v8index;


-- V8_RFM_REVENUE_POINTS

DROP TABLE V8_RFM_REVENUE_POINTS CASCADE CONSTRAINTS;

CREATE MATERIALIZED VIEW V8_RFM_REVENUE_POINTS REFRESH ON DEMAND AS SELECT * FROM V8_STATS_RFM_REVENUE_POINTS;

CREATE INDEX v8_rfm_revenue_points001 ON V8_RFM_REVENUE_POINTS(XCMS_ID) TABLESPACE v8index;


-- V8_RFM_RESCOUNT_POINTS_L

DROP TABLE V8_RFM_RESCOUNT_POINTS_L CASCADE CONSTRAINTS;

CREATE MATERIALIZED VIEW LOG ON ycln WITH PRIMARY KEY;

CREATE MATERIALIZED VIEW LOG ON ydet WITH PRIMARY KEY;

CREATE MATERIALIZED VIEW V8_RFM_RESCOUNT_POINTS_L REFRESH ON DEMAND AS SELECT * FROM V8_STATS_RFM_RESCOUNT_POINTS_L;

CREATE INDEX v8_rfm_rescount_points001_l ON V8_RFM_RESCOUNT_POINTS_L(XCMS_ID) TABLESPACE v8index;


-- V8_RFM_LASTDEP_POINTS_L

DROP TABLE V8_RFM_LASTDEP_POINTS_L CASCADE CONSTRAINTS;

CREATE MATERIALIZED VIEW V8_RFM_LASTDEP_POINTS_L REFRESH ON DEMAND AS SELECT * FROM V8_STATS_RFM_LASTDEP_POINTS_L;

CREATE INDEX v8_rfm_lastdep_points001_l ON V8_RFM_LASTDEP_POINTS_L(XCMS_ID) TABLESPACE v8index;


-- V8_RFM_REVENUE_POINTS_L

DROP TABLE V8_RFM_REVENUE_POINTS_L CASCADE CONSTRAINTS;

CREATE MATERIALIZED VIEW LOG ON zpos WITH PRIMARY KEY;

CREATE MATERIALIZED VIEW V8_RFM_REVENUE_POINTS_L REFRESH ON DEMAND AS SELECT * FROM V8_STATS_RFM_REVENUE_POINTS_L;

CREATE INDEX v8_rfm_revenue_points001_l ON V8_RFM_REVENUE_POINTS_L(XCMS_ID) TABLESPACE v8index;
