CREATE TABLE wx_coupon_0      LIKE wx_coupon;
CREATE TABLE wx_coupon_1      LIKE wx_coupon;
CREATE TABLE wx_coupon_2      LIKE wx_coupon;
CREATE TABLE wx_coupon_3      LIKE wx_coupon;
CREATE TABLE wx_coupon_4      LIKE wx_coupon;
CREATE TABLE wx_coupon_5      LIKE wx_coupon;
CREATE TABLE wx_coupon_6      LIKE wx_coupon;
CREATE TABLE wx_coupon_7      LIKE wx_coupon;
CREATE TABLE wx_coupon_8      LIKE wx_coupon;
CREATE TABLE wx_coupon_9      LIKE wx_coupon;
CREATE TABLE wx_coupon_10     LIKE wx_coupon;
CREATE TABLE wx_coupon_11     LIKE wx_coupon;
CREATE TABLE wx_coupon_12     LIKE wx_coupon;
CREATE TABLE wx_coupon_13     LIKE wx_coupon;
CREATE TABLE wx_coupon_14     LIKE wx_coupon;
CREATE TABLE wx_coupon_15     LIKE wx_coupon;
CREATE TABLE wx_coupon_16     LIKE wx_coupon;
CREATE TABLE wx_coupon_17     LIKE wx_coupon;
CREATE TABLE wx_coupon_18     LIKE wx_coupon;
CREATE TABLE wx_coupon_19     LIKE wx_coupon;
CREATE TABLE wx_coupon_20     LIKE wx_coupon;
CREATE TABLE wx_coupon_21     LIKE wx_coupon;
CREATE TABLE wx_coupon_22     LIKE wx_coupon;
CREATE TABLE wx_coupon_23     LIKE wx_coupon;
CREATE TABLE wx_coupon_24     LIKE wx_coupon;
CREATE TABLE wx_coupon_25     LIKE wx_coupon;
CREATE TABLE wx_coupon_26     LIKE wx_coupon;
CREATE TABLE wx_coupon_27     LIKE wx_coupon;
CREATE TABLE wx_coupon_28     LIKE wx_coupon;
CREATE TABLE wx_coupon_29     LIKE wx_coupon;
CREATE TABLE wx_coupon_30     LIKE wx_coupon;
CREATE TABLE wx_coupon_31     LIKE wx_coupon;
CREATE TABLE wx_coupon_32     LIKE wx_coupon;
CREATE TABLE wx_coupon_33     LIKE wx_coupon;
CREATE TABLE wx_coupon_34     LIKE wx_coupon;
CREATE TABLE wx_coupon_35     LIKE wx_coupon;
CREATE TABLE wx_coupon_36     LIKE wx_coupon;
CREATE TABLE wx_coupon_37     LIKE wx_coupon;
CREATE TABLE wx_coupon_38     LIKE wx_coupon;
CREATE TABLE wx_coupon_39     LIKE wx_coupon;
CREATE TABLE wx_coupon_40     LIKE wx_coupon;
CREATE TABLE wx_coupon_41     LIKE wx_coupon;
CREATE TABLE wx_coupon_42     LIKE wx_coupon;
CREATE TABLE wx_coupon_43     LIKE wx_coupon;
CREATE TABLE wx_coupon_44     LIKE wx_coupon;
CREATE TABLE wx_coupon_45     LIKE wx_coupon;
CREATE TABLE wx_coupon_46     LIKE wx_coupon;
CREATE TABLE wx_coupon_47     LIKE wx_coupon;
CREATE TABLE wx_coupon_48     LIKE wx_coupon;
CREATE TABLE wx_coupon_49     LIKE wx_coupon;
CREATE TABLE wx_coupon_50     LIKE wx_coupon;
CREATE TABLE wx_coupon_51     LIKE wx_coupon;
CREATE TABLE wx_coupon_52     LIKE wx_coupon;
CREATE TABLE wx_coupon_53     LIKE wx_coupon;
CREATE TABLE wx_coupon_54     LIKE wx_coupon;
CREATE TABLE wx_coupon_55     LIKE wx_coupon;
CREATE TABLE wx_coupon_56     LIKE wx_coupon;
CREATE TABLE wx_coupon_57     LIKE wx_coupon;
CREATE TABLE wx_coupon_58     LIKE wx_coupon;
CREATE TABLE wx_coupon_59     LIKE wx_coupon;
CREATE TABLE wx_coupon_60     LIKE wx_coupon;
CREATE TABLE wx_coupon_61     LIKE wx_coupon;
CREATE TABLE wx_coupon_62     LIKE wx_coupon;
CREATE TABLE wx_coupon_63     LIKE wx_coupon;
CREATE TABLE wx_coupon_64     LIKE wx_coupon;
CREATE TABLE wx_coupon_65     LIKE wx_coupon;
CREATE TABLE wx_coupon_66     LIKE wx_coupon;
CREATE TABLE wx_coupon_67     LIKE wx_coupon;
CREATE TABLE wx_coupon_68     LIKE wx_coupon;
CREATE TABLE wx_coupon_69     LIKE wx_coupon;
CREATE TABLE wx_coupon_70     LIKE wx_coupon;
CREATE TABLE wx_coupon_71     LIKE wx_coupon;
CREATE TABLE wx_coupon_72     LIKE wx_coupon;
CREATE TABLE wx_coupon_73     LIKE wx_coupon;
CREATE TABLE wx_coupon_74     LIKE wx_coupon;
CREATE TABLE wx_coupon_75     LIKE wx_coupon;
CREATE TABLE wx_coupon_76     LIKE wx_coupon;
CREATE TABLE wx_coupon_77     LIKE wx_coupon;
CREATE TABLE wx_coupon_78     LIKE wx_coupon;
CREATE TABLE wx_coupon_79     LIKE wx_coupon;
CREATE TABLE wx_coupon_80     LIKE wx_coupon;
CREATE TABLE wx_coupon_81     LIKE wx_coupon;
CREATE TABLE wx_coupon_82     LIKE wx_coupon;
CREATE TABLE wx_coupon_83     LIKE wx_coupon;
CREATE TABLE wx_coupon_84     LIKE wx_coupon;
CREATE TABLE wx_coupon_85     LIKE wx_coupon;
CREATE TABLE wx_coupon_86     LIKE wx_coupon;
CREATE TABLE wx_coupon_87     LIKE wx_coupon;
CREATE TABLE wx_coupon_88     LIKE wx_coupon;
CREATE TABLE wx_coupon_89     LIKE wx_coupon;
CREATE TABLE wx_coupon_90     LIKE wx_coupon;
CREATE TABLE wx_coupon_91     LIKE wx_coupon;
CREATE TABLE wx_coupon_92     LIKE wx_coupon;
CREATE TABLE wx_coupon_93     LIKE wx_coupon;
CREATE TABLE wx_coupon_94     LIKE wx_coupon;
CREATE TABLE wx_coupon_95     LIKE wx_coupon;
CREATE TABLE wx_coupon_96     LIKE wx_coupon;
CREATE TABLE wx_coupon_97     LIKE wx_coupon;
CREATE TABLE wx_coupon_98     LIKE wx_coupon;
CREATE TABLE wx_coupon_99     LIKE wx_coupon;

INSERT INTO wx_coupon_0 SELECT * FROM wx_coupon WHERE tenant_id IN ('1000');
INSERT INTO wx_coupon_1 SELECT * FROM wx_coupon WHERE tenant_id IN ('1','1001');
INSERT INTO wx_coupon_2 SELECT * FROM wx_coupon WHERE tenant_id IN ('1002');
INSERT INTO wx_coupon_3 SELECT * FROM wx_coupon WHERE tenant_id IN ('1003');
INSERT INTO wx_coupon_4 SELECT * FROM wx_coupon WHERE tenant_id IN ('1004');
INSERT INTO wx_coupon_5 SELECT * FROM wx_coupon WHERE tenant_id IN ('1005');
INSERT INTO wx_coupon_6 SELECT * FROM wx_coupon WHERE tenant_id IN ('1006');
INSERT INTO wx_coupon_7 SELECT * FROM wx_coupon WHERE tenant_id IN ('1007');
INSERT INTO wx_coupon_8 SELECT * FROM wx_coupon WHERE tenant_id IN ('1008');
INSERT INTO wx_coupon_9 SELECT * FROM wx_coupon WHERE tenant_id IN ('1009');
INSERT INTO wx_coupon_10 SELECT * FROM wx_coupon WHERE tenant_id IN ('1010');
INSERT INTO wx_coupon_11 SELECT * FROM wx_coupon WHERE tenant_id IN ('1011');
INSERT INTO wx_coupon_12 SELECT * FROM wx_coupon WHERE tenant_id IN ('1012');
INSERT INTO wx_coupon_13 SELECT * FROM wx_coupon WHERE tenant_id IN ('1013');
INSERT INTO wx_coupon_14 SELECT * FROM wx_coupon WHERE tenant_id IN ('1014');
INSERT INTO wx_coupon_15 SELECT * FROM wx_coupon WHERE tenant_id IN ('1015');
INSERT INTO wx_coupon_16 SELECT * FROM wx_coupon WHERE tenant_id IN ('1016');
INSERT INTO wx_coupon_17 SELECT * FROM wx_coupon WHERE tenant_id IN ('1017');
INSERT INTO wx_coupon_18 SELECT * FROM wx_coupon WHERE tenant_id IN ('1018');
INSERT INTO wx_coupon_19 SELECT * FROM wx_coupon WHERE tenant_id IN ('1019');
INSERT INTO wx_coupon_20 SELECT * FROM wx_coupon WHERE tenant_id IN ('1020');
INSERT INTO wx_coupon_21 SELECT * FROM wx_coupon WHERE tenant_id IN ('1021');
INSERT INTO wx_coupon_22 SELECT * FROM wx_coupon WHERE tenant_id IN ('1022');
INSERT INTO wx_coupon_23 SELECT * FROM wx_coupon WHERE tenant_id IN ('1023');
INSERT INTO wx_coupon_24 SELECT * FROM wx_coupon WHERE tenant_id IN ('1024');
INSERT INTO wx_coupon_25 SELECT * FROM wx_coupon WHERE tenant_id IN ('1025');
INSERT INTO wx_coupon_26 SELECT * FROM wx_coupon WHERE tenant_id IN ('1026');
INSERT INTO wx_coupon_27 SELECT * FROM wx_coupon WHERE tenant_id IN ('1027');
INSERT INTO wx_coupon_89 SELECT * FROM wx_coupon WHERE tenant_id IN ('789');
INSERT INTO wx_coupon_88 SELECT * FROM wx_coupon WHERE tenant_id IN ('788');
INSERT INTO wx_coupon_91 SELECT * FROM wx_coupon WHERE tenant_id IN ('791');

alter table wx_coupon rename to wx_coupon_sharing_all;   


CREATE TABLE wx_coupon_merchant_0      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_1      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_2      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_3      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_4      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_5      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_6      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_7      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_8      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_9      LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_10     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_11     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_12     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_13     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_14     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_15     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_16     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_17     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_18     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_19     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_20     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_21     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_22     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_23     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_24     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_25     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_26     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_27     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_28     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_29     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_30     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_31     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_32     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_33     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_34     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_35     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_36     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_37     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_38     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_39     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_40     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_41     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_42     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_43     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_44     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_45     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_46     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_47     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_48     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_49     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_50     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_51     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_52     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_53     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_54     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_55     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_56     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_57     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_58     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_59     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_60     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_61     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_62     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_63     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_64     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_65     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_66     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_67     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_68     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_69     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_70     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_71     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_72     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_73     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_74     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_75     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_76     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_77     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_78     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_79     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_80     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_81     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_82     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_83     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_84     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_85     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_86     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_87     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_88     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_89     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_90     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_91     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_92     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_93     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_94     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_95     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_96     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_97     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_98     LIKE wx_coupon_merchant;
CREATE TABLE wx_coupon_merchant_99     LIKE wx_coupon_merchant;

INSERT INTO wx_coupon_merchant_0 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1000');
INSERT INTO wx_coupon_merchant_1 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1','1001');
INSERT INTO wx_coupon_merchant_2 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1002');
INSERT INTO wx_coupon_merchant_3 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1003');
INSERT INTO wx_coupon_merchant_4 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1004');
INSERT INTO wx_coupon_merchant_5 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1005');
INSERT INTO wx_coupon_merchant_6 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1006');
INSERT INTO wx_coupon_merchant_7 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1007');
INSERT INTO wx_coupon_merchant_8 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1008');
INSERT INTO wx_coupon_merchant_9 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1009');
INSERT INTO wx_coupon_merchant_10 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1010');
INSERT INTO wx_coupon_merchant_11 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1011');
INSERT INTO wx_coupon_merchant_12 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1012');
INSERT INTO wx_coupon_merchant_13 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1013');
INSERT INTO wx_coupon_merchant_14 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1014');
INSERT INTO wx_coupon_merchant_15 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1015');
INSERT INTO wx_coupon_merchant_16 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1016');
INSERT INTO wx_coupon_merchant_17 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1017');
INSERT INTO wx_coupon_merchant_18 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1018');
INSERT INTO wx_coupon_merchant_19 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1019');
INSERT INTO wx_coupon_merchant_20 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1020');
INSERT INTO wx_coupon_merchant_21 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1021');
INSERT INTO wx_coupon_merchant_22 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1022');
INSERT INTO wx_coupon_merchant_23 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1023');
INSERT INTO wx_coupon_merchant_24 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1024');
INSERT INTO wx_coupon_merchant_25 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1025');
INSERT INTO wx_coupon_merchant_26 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1026');
INSERT INTO wx_coupon_merchant_27 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('1027');
INSERT INTO wx_coupon_merchant_89 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('789');
INSERT INTO wx_coupon_merchant_88 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('788');
INSERT INTO wx_coupon_merchant_91 SELECT * FROM wx_coupon_merchant WHERE tenant_id IN ('791');

alter table wx_coupon_merchant rename to wx_coupon_merchant_sharing_all;   

CREATE TABLE wx_coupon_channel_0      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_1      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_2      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_3      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_4      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_5      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_6      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_7      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_8      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_9      LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_10     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_11     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_12     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_13     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_14     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_15     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_16     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_17     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_18     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_19     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_20     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_21     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_22     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_23     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_24     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_25     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_26     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_27     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_28     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_29     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_30     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_31     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_32     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_33     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_34     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_35     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_36     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_37     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_38     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_39     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_40     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_41     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_42     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_43     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_44     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_45     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_46     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_47     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_48     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_49     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_50     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_51     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_52     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_53     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_54     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_55     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_56     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_57     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_58     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_59     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_60     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_61     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_62     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_63     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_64     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_65     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_66     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_67     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_68     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_69     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_70     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_71     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_72     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_73     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_74     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_75     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_76     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_77     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_78     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_79     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_80     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_81     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_82     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_83     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_84     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_85     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_86     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_87     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_88     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_89     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_90     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_91     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_92     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_93     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_94     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_95     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_96     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_97     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_98     LIKE wx_coupon_channel;
CREATE TABLE wx_coupon_channel_99     LIKE wx_coupon_channel;

INSERT INTO wx_coupon_channel_0 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1000');
INSERT INTO wx_coupon_channel_1 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1','1001');
INSERT INTO wx_coupon_channel_2 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1002');
INSERT INTO wx_coupon_channel_3 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1003');
INSERT INTO wx_coupon_channel_4 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1004');
INSERT INTO wx_coupon_channel_5 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1005');
INSERT INTO wx_coupon_channel_6 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1006');
INSERT INTO wx_coupon_channel_7 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1007');
INSERT INTO wx_coupon_channel_8 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1008');
INSERT INTO wx_coupon_channel_9 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1009');
INSERT INTO wx_coupon_channel_10 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1010');
INSERT INTO wx_coupon_channel_11 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1011');
INSERT INTO wx_coupon_channel_12 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1012');
INSERT INTO wx_coupon_channel_13 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1013');
INSERT INTO wx_coupon_channel_14 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1014');
INSERT INTO wx_coupon_channel_15 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1015');
INSERT INTO wx_coupon_channel_16 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1016');
INSERT INTO wx_coupon_channel_17 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1017');
INSERT INTO wx_coupon_channel_18 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1018');
INSERT INTO wx_coupon_channel_19 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1019');
INSERT INTO wx_coupon_channel_20 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1020');
INSERT INTO wx_coupon_channel_21 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1021');
INSERT INTO wx_coupon_channel_22 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1022');
INSERT INTO wx_coupon_channel_23 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1023');
INSERT INTO wx_coupon_channel_24 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1024');
INSERT INTO wx_coupon_channel_25 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1025');
INSERT INTO wx_coupon_channel_26 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1026');
INSERT INTO wx_coupon_channel_27 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('1027');
INSERT INTO wx_coupon_channel_89 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('789');
INSERT INTO wx_coupon_channel_88 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('788');
INSERT INTO wx_coupon_channel_91 SELECT * FROM wx_coupon_channel WHERE tenant_id IN ('791');

alter table wx_coupon_channel rename to wx_coupon_channel_sharing_all;  



CREATE TABLE wx_c_user_0      LIKE wx_c_user;
CREATE TABLE wx_c_user_1      LIKE wx_c_user;
CREATE TABLE wx_c_user_2      LIKE wx_c_user;
CREATE TABLE wx_c_user_3      LIKE wx_c_user;
CREATE TABLE wx_c_user_4      LIKE wx_c_user;
CREATE TABLE wx_c_user_5      LIKE wx_c_user;
CREATE TABLE wx_c_user_6      LIKE wx_c_user;
CREATE TABLE wx_c_user_7      LIKE wx_c_user;
CREATE TABLE wx_c_user_8      LIKE wx_c_user;
CREATE TABLE wx_c_user_9      LIKE wx_c_user;
CREATE TABLE wx_c_user_10     LIKE wx_c_user;
CREATE TABLE wx_c_user_11     LIKE wx_c_user;
CREATE TABLE wx_c_user_12     LIKE wx_c_user;
CREATE TABLE wx_c_user_13     LIKE wx_c_user;
CREATE TABLE wx_c_user_14     LIKE wx_c_user;
CREATE TABLE wx_c_user_15     LIKE wx_c_user;
CREATE TABLE wx_c_user_16     LIKE wx_c_user;
CREATE TABLE wx_c_user_17     LIKE wx_c_user;
CREATE TABLE wx_c_user_18     LIKE wx_c_user;
CREATE TABLE wx_c_user_19     LIKE wx_c_user;
CREATE TABLE wx_c_user_20     LIKE wx_c_user;
CREATE TABLE wx_c_user_21     LIKE wx_c_user;
CREATE TABLE wx_c_user_22     LIKE wx_c_user;
CREATE TABLE wx_c_user_23     LIKE wx_c_user;
CREATE TABLE wx_c_user_24     LIKE wx_c_user;
CREATE TABLE wx_c_user_25     LIKE wx_c_user;
CREATE TABLE wx_c_user_26     LIKE wx_c_user;
CREATE TABLE wx_c_user_27     LIKE wx_c_user;
CREATE TABLE wx_c_user_28     LIKE wx_c_user;
CREATE TABLE wx_c_user_29     LIKE wx_c_user;
CREATE TABLE wx_c_user_30     LIKE wx_c_user;
CREATE TABLE wx_c_user_31     LIKE wx_c_user;
CREATE TABLE wx_c_user_32     LIKE wx_c_user;
CREATE TABLE wx_c_user_33     LIKE wx_c_user;
CREATE TABLE wx_c_user_34     LIKE wx_c_user;
CREATE TABLE wx_c_user_35     LIKE wx_c_user;
CREATE TABLE wx_c_user_36     LIKE wx_c_user;
CREATE TABLE wx_c_user_37     LIKE wx_c_user;
CREATE TABLE wx_c_user_38     LIKE wx_c_user;
CREATE TABLE wx_c_user_39     LIKE wx_c_user;
CREATE TABLE wx_c_user_40     LIKE wx_c_user;
CREATE TABLE wx_c_user_41     LIKE wx_c_user;
CREATE TABLE wx_c_user_42     LIKE wx_c_user;
CREATE TABLE wx_c_user_43     LIKE wx_c_user;
CREATE TABLE wx_c_user_44     LIKE wx_c_user;
CREATE TABLE wx_c_user_45     LIKE wx_c_user;
CREATE TABLE wx_c_user_46     LIKE wx_c_user;
CREATE TABLE wx_c_user_47     LIKE wx_c_user;
CREATE TABLE wx_c_user_48     LIKE wx_c_user;
CREATE TABLE wx_c_user_49     LIKE wx_c_user;
CREATE TABLE wx_c_user_50     LIKE wx_c_user;
CREATE TABLE wx_c_user_51     LIKE wx_c_user;
CREATE TABLE wx_c_user_52     LIKE wx_c_user;
CREATE TABLE wx_c_user_53     LIKE wx_c_user;
CREATE TABLE wx_c_user_54     LIKE wx_c_user;
CREATE TABLE wx_c_user_55     LIKE wx_c_user;
CREATE TABLE wx_c_user_56     LIKE wx_c_user;
CREATE TABLE wx_c_user_57     LIKE wx_c_user;
CREATE TABLE wx_c_user_58     LIKE wx_c_user;
CREATE TABLE wx_c_user_59     LIKE wx_c_user;
CREATE TABLE wx_c_user_60     LIKE wx_c_user;
CREATE TABLE wx_c_user_61     LIKE wx_c_user;
CREATE TABLE wx_c_user_62     LIKE wx_c_user;
CREATE TABLE wx_c_user_63     LIKE wx_c_user;
CREATE TABLE wx_c_user_64     LIKE wx_c_user;
CREATE TABLE wx_c_user_65     LIKE wx_c_user;
CREATE TABLE wx_c_user_66     LIKE wx_c_user;
CREATE TABLE wx_c_user_67     LIKE wx_c_user;
CREATE TABLE wx_c_user_68     LIKE wx_c_user;
CREATE TABLE wx_c_user_69     LIKE wx_c_user;
CREATE TABLE wx_c_user_70     LIKE wx_c_user;
CREATE TABLE wx_c_user_71     LIKE wx_c_user;
CREATE TABLE wx_c_user_72     LIKE wx_c_user;
CREATE TABLE wx_c_user_73     LIKE wx_c_user;
CREATE TABLE wx_c_user_74     LIKE wx_c_user;
CREATE TABLE wx_c_user_75     LIKE wx_c_user;
CREATE TABLE wx_c_user_76     LIKE wx_c_user;
CREATE TABLE wx_c_user_77     LIKE wx_c_user;
CREATE TABLE wx_c_user_78     LIKE wx_c_user;
CREATE TABLE wx_c_user_79     LIKE wx_c_user;
CREATE TABLE wx_c_user_80     LIKE wx_c_user;
CREATE TABLE wx_c_user_81     LIKE wx_c_user;
CREATE TABLE wx_c_user_82     LIKE wx_c_user;
CREATE TABLE wx_c_user_83     LIKE wx_c_user;
CREATE TABLE wx_c_user_84     LIKE wx_c_user;
CREATE TABLE wx_c_user_85     LIKE wx_c_user;
CREATE TABLE wx_c_user_86     LIKE wx_c_user;
CREATE TABLE wx_c_user_87     LIKE wx_c_user;
CREATE TABLE wx_c_user_88     LIKE wx_c_user;
CREATE TABLE wx_c_user_89     LIKE wx_c_user;
CREATE TABLE wx_c_user_90     LIKE wx_c_user;
CREATE TABLE wx_c_user_91     LIKE wx_c_user;
CREATE TABLE wx_c_user_92     LIKE wx_c_user;
CREATE TABLE wx_c_user_93     LIKE wx_c_user;
CREATE TABLE wx_c_user_94     LIKE wx_c_user;
CREATE TABLE wx_c_user_95     LIKE wx_c_user;
CREATE TABLE wx_c_user_96     LIKE wx_c_user;
CREATE TABLE wx_c_user_97     LIKE wx_c_user;
CREATE TABLE wx_c_user_98     LIKE wx_c_user;
CREATE TABLE wx_c_user_99     LIKE wx_c_user;


INSERT INTO wx_c_user_0 SELECT * FROM wx_c_user WHERE tenant_id IN ('1000');
INSERT INTO wx_c_user_1 SELECT * FROM wx_c_user WHERE tenant_id IN ('1','1001');
INSERT INTO wx_c_user_2 SELECT * FROM wx_c_user WHERE tenant_id IN ('1002');
INSERT INTO wx_c_user_3 SELECT * FROM wx_c_user WHERE tenant_id IN ('1003');
INSERT INTO wx_c_user_4 SELECT * FROM wx_c_user WHERE tenant_id IN ('1004');
INSERT INTO wx_c_user_5 SELECT * FROM wx_c_user WHERE tenant_id IN ('1005');
INSERT INTO wx_c_user_6 SELECT * FROM wx_c_user WHERE tenant_id IN ('1006');
INSERT INTO wx_c_user_7 SELECT * FROM wx_c_user WHERE tenant_id IN ('1007');
INSERT INTO wx_c_user_8 SELECT * FROM wx_c_user WHERE tenant_id IN ('1008');
INSERT INTO wx_c_user_9 SELECT * FROM wx_c_user WHERE tenant_id IN ('1009');
INSERT INTO wx_c_user_10 SELECT * FROM wx_c_user WHERE tenant_id IN ('1010');
INSERT INTO wx_c_user_11 SELECT * FROM wx_c_user WHERE tenant_id IN ('1011');
INSERT INTO wx_c_user_12 SELECT * FROM wx_c_user WHERE tenant_id IN ('1012');
INSERT INTO wx_c_user_13 SELECT * FROM wx_c_user WHERE tenant_id IN ('1013');
INSERT INTO wx_c_user_14 SELECT * FROM wx_c_user WHERE tenant_id IN ('1014');
INSERT INTO wx_c_user_15 SELECT * FROM wx_c_user WHERE tenant_id IN ('1015');
INSERT INTO wx_c_user_16 SELECT * FROM wx_c_user WHERE tenant_id IN ('1016');
INSERT INTO wx_c_user_17 SELECT * FROM wx_c_user WHERE tenant_id IN ('1017');
INSERT INTO wx_c_user_18 SELECT * FROM wx_c_user WHERE tenant_id IN ('1018');
INSERT INTO wx_c_user_19 SELECT * FROM wx_c_user WHERE tenant_id IN ('1019');
INSERT INTO wx_c_user_20 SELECT * FROM wx_c_user WHERE tenant_id IN ('1020');
INSERT INTO wx_c_user_21 SELECT * FROM wx_c_user WHERE tenant_id IN ('1021');
INSERT INTO wx_c_user_22 SELECT * FROM wx_c_user WHERE tenant_id IN ('1022');
INSERT INTO wx_c_user_23 SELECT * FROM wx_c_user WHERE tenant_id IN ('1023');
INSERT INTO wx_c_user_24 SELECT * FROM wx_c_user WHERE tenant_id IN ('1024');
INSERT INTO wx_c_user_25 SELECT * FROM wx_c_user WHERE tenant_id IN ('1025');
INSERT INTO wx_c_user_26 SELECT * FROM wx_c_user WHERE tenant_id IN ('1026');
INSERT INTO wx_c_user_27 SELECT * FROM wx_c_user WHERE tenant_id IN ('1027');
INSERT INTO wx_c_user_89 SELECT * FROM wx_c_user WHERE tenant_id IN ('789');
INSERT INTO wx_c_user_88 SELECT * FROM wx_c_user WHERE tenant_id IN ('788');
INSERT INTO wx_c_user_91 SELECT * FROM wx_c_user WHERE tenant_id IN ('791');

alter table wx_c_user rename to wx_c_user_sharing_all; 

CREATE TABLE wx_c_user_basic_info_0      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_1      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_2      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_3      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_4      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_5      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_6      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_7      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_8      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_9      LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_10     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_11     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_12     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_13     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_14     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_15     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_16     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_17     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_18     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_19     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_20     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_21     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_22     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_23     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_24     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_25     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_26     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_27     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_28     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_29     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_30     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_31     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_32     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_33     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_34     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_35     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_36     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_37     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_38     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_39     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_40     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_41     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_42     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_43     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_44     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_45     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_46     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_47     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_48     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_49     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_50     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_51     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_52     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_53     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_54     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_55     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_56     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_57     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_58     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_59     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_60     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_61     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_62     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_63     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_64     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_65     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_66     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_67     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_68     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_69     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_70     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_71     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_72     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_73     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_74     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_75     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_76     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_77     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_78     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_79     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_80     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_81     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_82     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_83     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_84     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_85     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_86     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_87     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_88     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_89     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_90     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_91     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_92     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_93     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_94     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_95     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_96     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_97     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_98     LIKE wx_c_user_basic_info;
CREATE TABLE wx_c_user_basic_info_99     LIKE wx_c_user_basic_info;


INSERT INTO wx_c_user_basic_info_0 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1000');
INSERT INTO wx_c_user_basic_info_1 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1','1001');
INSERT INTO wx_c_user_basic_info_2 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1002');
INSERT INTO wx_c_user_basic_info_3 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1003');
INSERT INTO wx_c_user_basic_info_4 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1004');
INSERT INTO wx_c_user_basic_info_5 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1005');
INSERT INTO wx_c_user_basic_info_6 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1006');
INSERT INTO wx_c_user_basic_info_7 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1007');
INSERT INTO wx_c_user_basic_info_8 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1008');
INSERT INTO wx_c_user_basic_info_9 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1009');
INSERT INTO wx_c_user_basic_info_10 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1010');
INSERT INTO wx_c_user_basic_info_11 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1011');
INSERT INTO wx_c_user_basic_info_12 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1012');
INSERT INTO wx_c_user_basic_info_13 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1013');
INSERT INTO wx_c_user_basic_info_14 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1014');
INSERT INTO wx_c_user_basic_info_15 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1015');
INSERT INTO wx_c_user_basic_info_16 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1016');
INSERT INTO wx_c_user_basic_info_17 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1017');
INSERT INTO wx_c_user_basic_info_18 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1018');
INSERT INTO wx_c_user_basic_info_19 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1019');
INSERT INTO wx_c_user_basic_info_20 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1020');
INSERT INTO wx_c_user_basic_info_21 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1021');
INSERT INTO wx_c_user_basic_info_22 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1022');
INSERT INTO wx_c_user_basic_info_23 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1023');
INSERT INTO wx_c_user_basic_info_24 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1024');
INSERT INTO wx_c_user_basic_info_25 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1025');
INSERT INTO wx_c_user_basic_info_26 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1026');
INSERT INTO wx_c_user_basic_info_27 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('1027');
INSERT INTO wx_c_user_basic_info_89 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('789');
INSERT INTO wx_c_user_basic_info_88 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('788');
INSERT INTO wx_c_user_basic_info_91 SELECT * FROM wx_c_user_basic_info WHERE final_tenant_id IN ('791');

alter table wx_c_user_basic_info rename to wx_c_user_basic_info_sharing_all; 


CREATE TABLE wx_order_0      LIKE wx_order;
CREATE TABLE wx_order_1      LIKE wx_order;
CREATE TABLE wx_order_2      LIKE wx_order;
CREATE TABLE wx_order_3      LIKE wx_order;
CREATE TABLE wx_order_4      LIKE wx_order;
CREATE TABLE wx_order_5      LIKE wx_order;
CREATE TABLE wx_order_6      LIKE wx_order;
CREATE TABLE wx_order_7      LIKE wx_order;
CREATE TABLE wx_order_8      LIKE wx_order;
CREATE TABLE wx_order_9      LIKE wx_order;
CREATE TABLE wx_order_10     LIKE wx_order;
CREATE TABLE wx_order_11     LIKE wx_order;
CREATE TABLE wx_order_12     LIKE wx_order;
CREATE TABLE wx_order_13     LIKE wx_order;
CREATE TABLE wx_order_14     LIKE wx_order;
CREATE TABLE wx_order_15     LIKE wx_order;
CREATE TABLE wx_order_16     LIKE wx_order;
CREATE TABLE wx_order_17     LIKE wx_order;
CREATE TABLE wx_order_18     LIKE wx_order;
CREATE TABLE wx_order_19     LIKE wx_order;
CREATE TABLE wx_order_20     LIKE wx_order;
CREATE TABLE wx_order_21     LIKE wx_order;
CREATE TABLE wx_order_22     LIKE wx_order;
CREATE TABLE wx_order_23     LIKE wx_order;
CREATE TABLE wx_order_24     LIKE wx_order;
CREATE TABLE wx_order_25     LIKE wx_order;
CREATE TABLE wx_order_26     LIKE wx_order;
CREATE TABLE wx_order_27     LIKE wx_order;
CREATE TABLE wx_order_28     LIKE wx_order;
CREATE TABLE wx_order_29     LIKE wx_order;
CREATE TABLE wx_order_30     LIKE wx_order;
CREATE TABLE wx_order_31     LIKE wx_order;
CREATE TABLE wx_order_32     LIKE wx_order;
CREATE TABLE wx_order_33     LIKE wx_order;
CREATE TABLE wx_order_34     LIKE wx_order;
CREATE TABLE wx_order_35     LIKE wx_order;
CREATE TABLE wx_order_36     LIKE wx_order;
CREATE TABLE wx_order_37     LIKE wx_order;
CREATE TABLE wx_order_38     LIKE wx_order;
CREATE TABLE wx_order_39     LIKE wx_order;
CREATE TABLE wx_order_40     LIKE wx_order;
CREATE TABLE wx_order_41     LIKE wx_order;
CREATE TABLE wx_order_42     LIKE wx_order;
CREATE TABLE wx_order_43     LIKE wx_order;
CREATE TABLE wx_order_44     LIKE wx_order;
CREATE TABLE wx_order_45     LIKE wx_order;
CREATE TABLE wx_order_46     LIKE wx_order;
CREATE TABLE wx_order_47     LIKE wx_order;
CREATE TABLE wx_order_48     LIKE wx_order;
CREATE TABLE wx_order_49     LIKE wx_order;
CREATE TABLE wx_order_50     LIKE wx_order;
CREATE TABLE wx_order_51     LIKE wx_order;
CREATE TABLE wx_order_52     LIKE wx_order;
CREATE TABLE wx_order_53     LIKE wx_order;
CREATE TABLE wx_order_54     LIKE wx_order;
CREATE TABLE wx_order_55     LIKE wx_order;
CREATE TABLE wx_order_56     LIKE wx_order;
CREATE TABLE wx_order_57     LIKE wx_order;
CREATE TABLE wx_order_58     LIKE wx_order;
CREATE TABLE wx_order_59     LIKE wx_order;
CREATE TABLE wx_order_60     LIKE wx_order;
CREATE TABLE wx_order_61     LIKE wx_order;
CREATE TABLE wx_order_62     LIKE wx_order;
CREATE TABLE wx_order_63     LIKE wx_order;
CREATE TABLE wx_order_64     LIKE wx_order;
CREATE TABLE wx_order_65     LIKE wx_order;
CREATE TABLE wx_order_66     LIKE wx_order;
CREATE TABLE wx_order_67     LIKE wx_order;
CREATE TABLE wx_order_68     LIKE wx_order;
CREATE TABLE wx_order_69     LIKE wx_order;
CREATE TABLE wx_order_70     LIKE wx_order;
CREATE TABLE wx_order_71     LIKE wx_order;
CREATE TABLE wx_order_72     LIKE wx_order;
CREATE TABLE wx_order_73     LIKE wx_order;
CREATE TABLE wx_order_74     LIKE wx_order;
CREATE TABLE wx_order_75     LIKE wx_order;
CREATE TABLE wx_order_76     LIKE wx_order;
CREATE TABLE wx_order_77     LIKE wx_order;
CREATE TABLE wx_order_78     LIKE wx_order;
CREATE TABLE wx_order_79     LIKE wx_order;
CREATE TABLE wx_order_80     LIKE wx_order;
CREATE TABLE wx_order_81     LIKE wx_order;
CREATE TABLE wx_order_82     LIKE wx_order;
CREATE TABLE wx_order_83     LIKE wx_order;
CREATE TABLE wx_order_84     LIKE wx_order;
CREATE TABLE wx_order_85     LIKE wx_order;
CREATE TABLE wx_order_86     LIKE wx_order;
CREATE TABLE wx_order_87     LIKE wx_order;
CREATE TABLE wx_order_88     LIKE wx_order;
CREATE TABLE wx_order_89     LIKE wx_order;
CREATE TABLE wx_order_90     LIKE wx_order;
CREATE TABLE wx_order_91     LIKE wx_order;
CREATE TABLE wx_order_92     LIKE wx_order;
CREATE TABLE wx_order_93     LIKE wx_order;
CREATE TABLE wx_order_94     LIKE wx_order;
CREATE TABLE wx_order_95     LIKE wx_order;
CREATE TABLE wx_order_96     LIKE wx_order;
CREATE TABLE wx_order_97     LIKE wx_order;
CREATE TABLE wx_order_98     LIKE wx_order;
CREATE TABLE wx_order_99     LIKE wx_order;

INSERT INTO wx_order_0 SELECT * FROM wx_order WHERE tenant_id IN ('1000');
INSERT INTO wx_order_1 SELECT * FROM wx_order WHERE tenant_id IN ('1','1001');
INSERT INTO wx_order_2 SELECT * FROM wx_order WHERE tenant_id IN ('1002');
INSERT INTO wx_order_3 SELECT * FROM wx_order WHERE tenant_id IN ('1003');
INSERT INTO wx_order_4 SELECT * FROM wx_order WHERE tenant_id IN ('1004');
INSERT INTO wx_order_5 SELECT * FROM wx_order WHERE tenant_id IN ('1005');
INSERT INTO wx_order_6 SELECT * FROM wx_order WHERE tenant_id IN ('1006');
INSERT INTO wx_order_7 SELECT * FROM wx_order WHERE tenant_id IN ('1007');
INSERT INTO wx_order_8 SELECT * FROM wx_order WHERE tenant_id IN ('1008');
INSERT INTO wx_order_9 SELECT * FROM wx_order WHERE tenant_id IN ('1009');
INSERT INTO wx_order_10 SELECT * FROM wx_order WHERE tenant_id IN ('1010');
INSERT INTO wx_order_11 SELECT * FROM wx_order WHERE tenant_id IN ('1011');
INSERT INTO wx_order_12 SELECT * FROM wx_order WHERE tenant_id IN ('1012');
INSERT INTO wx_order_13 SELECT * FROM wx_order WHERE tenant_id IN ('1013');
INSERT INTO wx_order_14 SELECT * FROM wx_order WHERE tenant_id IN ('1014');
INSERT INTO wx_order_15 SELECT * FROM wx_order WHERE tenant_id IN ('1015');
INSERT INTO wx_order_16 SELECT * FROM wx_order WHERE tenant_id IN ('1016');
INSERT INTO wx_order_17 SELECT * FROM wx_order WHERE tenant_id IN ('1017');
INSERT INTO wx_order_18 SELECT * FROM wx_order WHERE tenant_id IN ('1018');
INSERT INTO wx_order_19 SELECT * FROM wx_order WHERE tenant_id IN ('1019');
INSERT INTO wx_order_20 SELECT * FROM wx_order WHERE tenant_id IN ('1020');
INSERT INTO wx_order_21 SELECT * FROM wx_order WHERE tenant_id IN ('1021');
INSERT INTO wx_order_22 SELECT * FROM wx_order WHERE tenant_id IN ('1022');
INSERT INTO wx_order_23 SELECT * FROM wx_order WHERE tenant_id IN ('1023');
INSERT INTO wx_order_24 SELECT * FROM wx_order WHERE tenant_id IN ('1024');
INSERT INTO wx_order_25 SELECT * FROM wx_order WHERE tenant_id IN ('1025');
INSERT INTO wx_order_26 SELECT * FROM wx_order WHERE tenant_id IN ('1026');
INSERT INTO wx_order_27 SELECT * FROM wx_order WHERE tenant_id IN ('1027');
INSERT INTO wx_order_89 SELECT * FROM wx_order WHERE tenant_id IN ('789');
INSERT INTO wx_order_88 SELECT * FROM wx_order WHERE tenant_id IN ('788');
INSERT INTO wx_order_91 SELECT * FROM wx_order WHERE tenant_id IN ('791');

alter table wx_order rename to wx_order_sharing_all; 

CREATE TABLE wx_pay_order_0      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_1      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_2      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_3      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_4      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_5      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_6      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_7      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_8      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_9      LIKE wx_pay_order;
CREATE TABLE wx_pay_order_10     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_11     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_12     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_13     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_14     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_15     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_16     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_17     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_18     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_19     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_20     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_21     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_22     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_23     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_24     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_25     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_26     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_27     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_28     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_29     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_30     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_31     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_32     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_33     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_34     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_35     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_36     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_37     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_38     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_39     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_40     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_41     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_42     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_43     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_44     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_45     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_46     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_47     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_48     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_49     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_50     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_51     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_52     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_53     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_54     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_55     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_56     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_57     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_58     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_59     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_60     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_61     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_62     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_63     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_64     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_65     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_66     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_67     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_68     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_69     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_70     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_71     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_72     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_73     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_74     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_75     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_76     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_77     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_78     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_79     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_80     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_81     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_82     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_83     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_84     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_85     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_86     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_87     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_88     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_89     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_90     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_91     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_92     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_93     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_94     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_95     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_96     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_97     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_98     LIKE wx_pay_order;
CREATE TABLE wx_pay_order_99     LIKE wx_pay_order;


INSERT INTO wx_pay_order_0 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1000');
INSERT INTO wx_pay_order_1 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1','1001');
INSERT INTO wx_pay_order_2 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1002');
INSERT INTO wx_pay_order_3 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1003');
INSERT INTO wx_pay_order_4 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1004');
INSERT INTO wx_pay_order_5 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1005');
INSERT INTO wx_pay_order_6 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1006');
INSERT INTO wx_pay_order_7 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1007');
INSERT INTO wx_pay_order_8 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1008');
INSERT INTO wx_pay_order_9 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1009');
INSERT INTO wx_pay_order_10 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1010');
INSERT INTO wx_pay_order_11 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1011');
INSERT INTO wx_pay_order_12 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1012');
INSERT INTO wx_pay_order_13 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1013');
INSERT INTO wx_pay_order_14 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1014');
INSERT INTO wx_pay_order_15 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1015');
INSERT INTO wx_pay_order_16 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1016');
INSERT INTO wx_pay_order_17 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1017');
INSERT INTO wx_pay_order_18 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1018');
INSERT INTO wx_pay_order_19 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1019');
INSERT INTO wx_pay_order_20 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1020');
INSERT INTO wx_pay_order_21 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1021');
INSERT INTO wx_pay_order_22 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1022');
INSERT INTO wx_pay_order_23 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1023');
INSERT INTO wx_pay_order_24 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1024');
INSERT INTO wx_pay_order_25 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1025');
INSERT INTO wx_pay_order_26 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1026');
INSERT INTO wx_pay_order_27 SELECT * FROM wx_pay_order WHERE tenant_id IN ('1027');
INSERT INTO wx_pay_order_89 SELECT * FROM wx_pay_order WHERE tenant_id IN ('789');
INSERT INTO wx_pay_order_88 SELECT * FROM wx_pay_order WHERE tenant_id IN ('788');
INSERT INTO wx_pay_order_91 SELECT * FROM wx_pay_order WHERE tenant_id IN ('791');

alter table wx_pay_order rename to wx_pay_order_sharing_all; 

CREATE TABLE wx_coupon_order_0      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_1      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_2      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_3      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_4      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_5      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_6      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_7      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_8      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_9      LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_10     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_11     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_12     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_13     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_14     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_15     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_16     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_17     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_18     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_19     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_20     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_21     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_22     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_23     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_24     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_25     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_26     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_27     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_28     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_29     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_30     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_31     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_32     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_33     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_34     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_35     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_36     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_37     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_38     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_39     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_40     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_41     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_42     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_43     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_44     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_45     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_46     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_47     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_48     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_49     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_50     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_51     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_52     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_53     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_54     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_55     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_56     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_57     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_58     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_59     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_60     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_61     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_62     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_63     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_64     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_65     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_66     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_67     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_68     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_69     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_70     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_71     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_72     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_73     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_74     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_75     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_76     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_77     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_78     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_79     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_80     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_81     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_82     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_83     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_84     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_85     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_86     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_87     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_88     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_89     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_90     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_91     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_92     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_93     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_94     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_95     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_96     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_97     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_98     LIKE wx_coupon_order;
CREATE TABLE wx_coupon_order_99     LIKE wx_coupon_order;

INSERT INTO wx_coupon_order_0 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1000');
INSERT INTO wx_coupon_order_1 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1','1001');
INSERT INTO wx_coupon_order_2 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1002');
INSERT INTO wx_coupon_order_3 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1003');
INSERT INTO wx_coupon_order_4 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1004');
INSERT INTO wx_coupon_order_5 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1005');
INSERT INTO wx_coupon_order_6 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1006');
INSERT INTO wx_coupon_order_7 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1007');
INSERT INTO wx_coupon_order_8 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1008');
INSERT INTO wx_coupon_order_9 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1009');
INSERT INTO wx_coupon_order_10 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1010');
INSERT INTO wx_coupon_order_11 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1011');
INSERT INTO wx_coupon_order_12 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1012');
INSERT INTO wx_coupon_order_13 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1013');
INSERT INTO wx_coupon_order_14 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1014');
INSERT INTO wx_coupon_order_15 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1015');
INSERT INTO wx_coupon_order_16 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1016');
INSERT INTO wx_coupon_order_17 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1017');
INSERT INTO wx_coupon_order_18 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1018');
INSERT INTO wx_coupon_order_19 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1019');
INSERT INTO wx_coupon_order_20 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1020');
INSERT INTO wx_coupon_order_21 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1021');
INSERT INTO wx_coupon_order_22 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1022');
INSERT INTO wx_coupon_order_23 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1023');
INSERT INTO wx_coupon_order_24 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1024');
INSERT INTO wx_coupon_order_25 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1025');
INSERT INTO wx_coupon_order_26 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1026');
INSERT INTO wx_coupon_order_27 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('1027');
INSERT INTO wx_coupon_order_89 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('789');
INSERT INTO wx_coupon_order_88 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('788');
INSERT INTO wx_coupon_order_91 SELECT * FROM wx_coupon_order WHERE tenant_id IN ('791');

alter table wx_coupon_order rename to wx_coupon_order_sharing_all; 

CREATE TABLE wx_order_group_0      LIKE wx_order_group;
CREATE TABLE wx_order_group_1      LIKE wx_order_group;
CREATE TABLE wx_order_group_2      LIKE wx_order_group;
CREATE TABLE wx_order_group_3      LIKE wx_order_group;
CREATE TABLE wx_order_group_4      LIKE wx_order_group;
CREATE TABLE wx_order_group_5      LIKE wx_order_group;
CREATE TABLE wx_order_group_6      LIKE wx_order_group;
CREATE TABLE wx_order_group_7      LIKE wx_order_group;
CREATE TABLE wx_order_group_8      LIKE wx_order_group;
CREATE TABLE wx_order_group_9      LIKE wx_order_group;
CREATE TABLE wx_order_group_10     LIKE wx_order_group;
CREATE TABLE wx_order_group_11     LIKE wx_order_group;
CREATE TABLE wx_order_group_12     LIKE wx_order_group;
CREATE TABLE wx_order_group_13     LIKE wx_order_group;
CREATE TABLE wx_order_group_14     LIKE wx_order_group;
CREATE TABLE wx_order_group_15     LIKE wx_order_group;
CREATE TABLE wx_order_group_16     LIKE wx_order_group;
CREATE TABLE wx_order_group_17     LIKE wx_order_group;
CREATE TABLE wx_order_group_18     LIKE wx_order_group;
CREATE TABLE wx_order_group_19     LIKE wx_order_group;
CREATE TABLE wx_order_group_20     LIKE wx_order_group;
CREATE TABLE wx_order_group_21     LIKE wx_order_group;
CREATE TABLE wx_order_group_22     LIKE wx_order_group;
CREATE TABLE wx_order_group_23     LIKE wx_order_group;
CREATE TABLE wx_order_group_24     LIKE wx_order_group;
CREATE TABLE wx_order_group_25     LIKE wx_order_group;
CREATE TABLE wx_order_group_26     LIKE wx_order_group;
CREATE TABLE wx_order_group_27     LIKE wx_order_group;
CREATE TABLE wx_order_group_28     LIKE wx_order_group;
CREATE TABLE wx_order_group_29     LIKE wx_order_group;
CREATE TABLE wx_order_group_30     LIKE wx_order_group;
CREATE TABLE wx_order_group_31     LIKE wx_order_group;
CREATE TABLE wx_order_group_32     LIKE wx_order_group;
CREATE TABLE wx_order_group_33     LIKE wx_order_group;
CREATE TABLE wx_order_group_34     LIKE wx_order_group;
CREATE TABLE wx_order_group_35     LIKE wx_order_group;
CREATE TABLE wx_order_group_36     LIKE wx_order_group;
CREATE TABLE wx_order_group_37     LIKE wx_order_group;
CREATE TABLE wx_order_group_38     LIKE wx_order_group;
CREATE TABLE wx_order_group_39     LIKE wx_order_group;
CREATE TABLE wx_order_group_40     LIKE wx_order_group;
CREATE TABLE wx_order_group_41     LIKE wx_order_group;
CREATE TABLE wx_order_group_42     LIKE wx_order_group;
CREATE TABLE wx_order_group_43     LIKE wx_order_group;
CREATE TABLE wx_order_group_44     LIKE wx_order_group;
CREATE TABLE wx_order_group_45     LIKE wx_order_group;
CREATE TABLE wx_order_group_46     LIKE wx_order_group;
CREATE TABLE wx_order_group_47     LIKE wx_order_group;
CREATE TABLE wx_order_group_48     LIKE wx_order_group;
CREATE TABLE wx_order_group_49     LIKE wx_order_group;
CREATE TABLE wx_order_group_50     LIKE wx_order_group;
CREATE TABLE wx_order_group_51     LIKE wx_order_group;
CREATE TABLE wx_order_group_52     LIKE wx_order_group;
CREATE TABLE wx_order_group_53     LIKE wx_order_group;
CREATE TABLE wx_order_group_54     LIKE wx_order_group;
CREATE TABLE wx_order_group_55     LIKE wx_order_group;
CREATE TABLE wx_order_group_56     LIKE wx_order_group;
CREATE TABLE wx_order_group_57     LIKE wx_order_group;
CREATE TABLE wx_order_group_58     LIKE wx_order_group;
CREATE TABLE wx_order_group_59     LIKE wx_order_group;
CREATE TABLE wx_order_group_60     LIKE wx_order_group;
CREATE TABLE wx_order_group_61     LIKE wx_order_group;
CREATE TABLE wx_order_group_62     LIKE wx_order_group;
CREATE TABLE wx_order_group_63     LIKE wx_order_group;
CREATE TABLE wx_order_group_64     LIKE wx_order_group;
CREATE TABLE wx_order_group_65     LIKE wx_order_group;
CREATE TABLE wx_order_group_66     LIKE wx_order_group;
CREATE TABLE wx_order_group_67     LIKE wx_order_group;
CREATE TABLE wx_order_group_68     LIKE wx_order_group;
CREATE TABLE wx_order_group_69     LIKE wx_order_group;
CREATE TABLE wx_order_group_70     LIKE wx_order_group;
CREATE TABLE wx_order_group_71     LIKE wx_order_group;
CREATE TABLE wx_order_group_72     LIKE wx_order_group;
CREATE TABLE wx_order_group_73     LIKE wx_order_group;
CREATE TABLE wx_order_group_74     LIKE wx_order_group;
CREATE TABLE wx_order_group_75     LIKE wx_order_group;
CREATE TABLE wx_order_group_76     LIKE wx_order_group;
CREATE TABLE wx_order_group_77     LIKE wx_order_group;
CREATE TABLE wx_order_group_78     LIKE wx_order_group;
CREATE TABLE wx_order_group_79     LIKE wx_order_group;
CREATE TABLE wx_order_group_80     LIKE wx_order_group;
CREATE TABLE wx_order_group_81     LIKE wx_order_group;
CREATE TABLE wx_order_group_82     LIKE wx_order_group;
CREATE TABLE wx_order_group_83     LIKE wx_order_group;
CREATE TABLE wx_order_group_84     LIKE wx_order_group;
CREATE TABLE wx_order_group_85     LIKE wx_order_group;
CREATE TABLE wx_order_group_86     LIKE wx_order_group;
CREATE TABLE wx_order_group_87     LIKE wx_order_group;
CREATE TABLE wx_order_group_88     LIKE wx_order_group;
CREATE TABLE wx_order_group_89     LIKE wx_order_group;
CREATE TABLE wx_order_group_90     LIKE wx_order_group;
CREATE TABLE wx_order_group_91     LIKE wx_order_group;
CREATE TABLE wx_order_group_92     LIKE wx_order_group;
CREATE TABLE wx_order_group_93     LIKE wx_order_group;
CREATE TABLE wx_order_group_94     LIKE wx_order_group;
CREATE TABLE wx_order_group_95     LIKE wx_order_group;
CREATE TABLE wx_order_group_96     LIKE wx_order_group;
CREATE TABLE wx_order_group_97     LIKE wx_order_group;
CREATE TABLE wx_order_group_98     LIKE wx_order_group;
CREATE TABLE wx_order_group_99     LIKE wx_order_group;

INSERT INTO wx_order_group_0 SELECT * FROM wx_order_group WHERE tenant_id IN ('1000');
INSERT INTO wx_order_group_1 SELECT * FROM wx_order_group WHERE tenant_id IN ('1','1001');
INSERT INTO wx_order_group_2 SELECT * FROM wx_order_group WHERE tenant_id IN ('1002');
INSERT INTO wx_order_group_3 SELECT * FROM wx_order_group WHERE tenant_id IN ('1003');
INSERT INTO wx_order_group_4 SELECT * FROM wx_order_group WHERE tenant_id IN ('1004');
INSERT INTO wx_order_group_5 SELECT * FROM wx_order_group WHERE tenant_id IN ('1005');
INSERT INTO wx_order_group_6 SELECT * FROM wx_order_group WHERE tenant_id IN ('1006');
INSERT INTO wx_order_group_7 SELECT * FROM wx_order_group WHERE tenant_id IN ('1007');
INSERT INTO wx_order_group_8 SELECT * FROM wx_order_group WHERE tenant_id IN ('1008');
INSERT INTO wx_order_group_9 SELECT * FROM wx_order_group WHERE tenant_id IN ('1009');
INSERT INTO wx_order_group_10 SELECT * FROM wx_order_group WHERE tenant_id IN ('1010');
INSERT INTO wx_order_group_11 SELECT * FROM wx_order_group WHERE tenant_id IN ('1011');
INSERT INTO wx_order_group_12 SELECT * FROM wx_order_group WHERE tenant_id IN ('1012');
INSERT INTO wx_order_group_13 SELECT * FROM wx_order_group WHERE tenant_id IN ('1013');
INSERT INTO wx_order_group_14 SELECT * FROM wx_order_group WHERE tenant_id IN ('1014');
INSERT INTO wx_order_group_15 SELECT * FROM wx_order_group WHERE tenant_id IN ('1015');
INSERT INTO wx_order_group_16 SELECT * FROM wx_order_group WHERE tenant_id IN ('1016');
INSERT INTO wx_order_group_17 SELECT * FROM wx_order_group WHERE tenant_id IN ('1017');
INSERT INTO wx_order_group_18 SELECT * FROM wx_order_group WHERE tenant_id IN ('1018');
INSERT INTO wx_order_group_19 SELECT * FROM wx_order_group WHERE tenant_id IN ('1019');
INSERT INTO wx_order_group_20 SELECT * FROM wx_order_group WHERE tenant_id IN ('1020');
INSERT INTO wx_order_group_21 SELECT * FROM wx_order_group WHERE tenant_id IN ('1021');
INSERT INTO wx_order_group_22 SELECT * FROM wx_order_group WHERE tenant_id IN ('1022');
INSERT INTO wx_order_group_23 SELECT * FROM wx_order_group WHERE tenant_id IN ('1023');
INSERT INTO wx_order_group_24 SELECT * FROM wx_order_group WHERE tenant_id IN ('1024');
INSERT INTO wx_order_group_25 SELECT * FROM wx_order_group WHERE tenant_id IN ('1025');
INSERT INTO wx_order_group_26 SELECT * FROM wx_order_group WHERE tenant_id IN ('1026');
INSERT INTO wx_order_group_27 SELECT * FROM wx_order_group WHERE tenant_id IN ('1027');
INSERT INTO wx_order_group_89 SELECT * FROM wx_order_group WHERE tenant_id IN ('789');
INSERT INTO wx_order_group_88 SELECT * FROM wx_order_group WHERE tenant_id IN ('788');
INSERT INTO wx_order_group_91 SELECT * FROM wx_order_group WHERE tenant_id IN ('791');

alter table wx_order_group rename to wx_order_group_sharing_all; 


CREATE TABLE wx_order_press_0      LIKE wx_order_press;
CREATE TABLE wx_order_press_1      LIKE wx_order_press;
CREATE TABLE wx_order_press_2      LIKE wx_order_press;
CREATE TABLE wx_order_press_3      LIKE wx_order_press;
CREATE TABLE wx_order_press_4      LIKE wx_order_press;
CREATE TABLE wx_order_press_5      LIKE wx_order_press;
CREATE TABLE wx_order_press_6      LIKE wx_order_press;
CREATE TABLE wx_order_press_7      LIKE wx_order_press;
CREATE TABLE wx_order_press_8      LIKE wx_order_press;
CREATE TABLE wx_order_press_9      LIKE wx_order_press;
CREATE TABLE wx_order_press_10     LIKE wx_order_press;
CREATE TABLE wx_order_press_11     LIKE wx_order_press;
CREATE TABLE wx_order_press_12     LIKE wx_order_press;
CREATE TABLE wx_order_press_13     LIKE wx_order_press;
CREATE TABLE wx_order_press_14     LIKE wx_order_press;
CREATE TABLE wx_order_press_15     LIKE wx_order_press;
CREATE TABLE wx_order_press_16     LIKE wx_order_press;
CREATE TABLE wx_order_press_17     LIKE wx_order_press;
CREATE TABLE wx_order_press_18     LIKE wx_order_press;
CREATE TABLE wx_order_press_19     LIKE wx_order_press;
CREATE TABLE wx_order_press_20     LIKE wx_order_press;
CREATE TABLE wx_order_press_21     LIKE wx_order_press;
CREATE TABLE wx_order_press_22     LIKE wx_order_press;
CREATE TABLE wx_order_press_23     LIKE wx_order_press;
CREATE TABLE wx_order_press_24     LIKE wx_order_press;
CREATE TABLE wx_order_press_25     LIKE wx_order_press;
CREATE TABLE wx_order_press_26     LIKE wx_order_press;
CREATE TABLE wx_order_press_27     LIKE wx_order_press;
CREATE TABLE wx_order_press_28     LIKE wx_order_press;
CREATE TABLE wx_order_press_29     LIKE wx_order_press;
CREATE TABLE wx_order_press_30     LIKE wx_order_press;
CREATE TABLE wx_order_press_31     LIKE wx_order_press;
CREATE TABLE wx_order_press_32     LIKE wx_order_press;
CREATE TABLE wx_order_press_33     LIKE wx_order_press;
CREATE TABLE wx_order_press_34     LIKE wx_order_press;
CREATE TABLE wx_order_press_35     LIKE wx_order_press;
CREATE TABLE wx_order_press_36     LIKE wx_order_press;
CREATE TABLE wx_order_press_37     LIKE wx_order_press;
CREATE TABLE wx_order_press_38     LIKE wx_order_press;
CREATE TABLE wx_order_press_39     LIKE wx_order_press;
CREATE TABLE wx_order_press_40     LIKE wx_order_press;
CREATE TABLE wx_order_press_41     LIKE wx_order_press;
CREATE TABLE wx_order_press_42     LIKE wx_order_press;
CREATE TABLE wx_order_press_43     LIKE wx_order_press;
CREATE TABLE wx_order_press_44     LIKE wx_order_press;
CREATE TABLE wx_order_press_45     LIKE wx_order_press;
CREATE TABLE wx_order_press_46     LIKE wx_order_press;
CREATE TABLE wx_order_press_47     LIKE wx_order_press;
CREATE TABLE wx_order_press_48     LIKE wx_order_press;
CREATE TABLE wx_order_press_49     LIKE wx_order_press;
CREATE TABLE wx_order_press_50     LIKE wx_order_press;
CREATE TABLE wx_order_press_51     LIKE wx_order_press;
CREATE TABLE wx_order_press_52     LIKE wx_order_press;
CREATE TABLE wx_order_press_53     LIKE wx_order_press;
CREATE TABLE wx_order_press_54     LIKE wx_order_press;
CREATE TABLE wx_order_press_55     LIKE wx_order_press;
CREATE TABLE wx_order_press_56     LIKE wx_order_press;
CREATE TABLE wx_order_press_57     LIKE wx_order_press;
CREATE TABLE wx_order_press_58     LIKE wx_order_press;
CREATE TABLE wx_order_press_59     LIKE wx_order_press;
CREATE TABLE wx_order_press_60     LIKE wx_order_press;
CREATE TABLE wx_order_press_61     LIKE wx_order_press;
CREATE TABLE wx_order_press_62     LIKE wx_order_press;
CREATE TABLE wx_order_press_63     LIKE wx_order_press;
CREATE TABLE wx_order_press_64     LIKE wx_order_press;
CREATE TABLE wx_order_press_65     LIKE wx_order_press;
CREATE TABLE wx_order_press_66     LIKE wx_order_press;
CREATE TABLE wx_order_press_67     LIKE wx_order_press;
CREATE TABLE wx_order_press_68     LIKE wx_order_press;
CREATE TABLE wx_order_press_69     LIKE wx_order_press;
CREATE TABLE wx_order_press_70     LIKE wx_order_press;
CREATE TABLE wx_order_press_71     LIKE wx_order_press;
CREATE TABLE wx_order_press_72     LIKE wx_order_press;
CREATE TABLE wx_order_press_73     LIKE wx_order_press;
CREATE TABLE wx_order_press_74     LIKE wx_order_press;
CREATE TABLE wx_order_press_75     LIKE wx_order_press;
CREATE TABLE wx_order_press_76     LIKE wx_order_press;
CREATE TABLE wx_order_press_77     LIKE wx_order_press;
CREATE TABLE wx_order_press_78     LIKE wx_order_press;
CREATE TABLE wx_order_press_79     LIKE wx_order_press;
CREATE TABLE wx_order_press_80     LIKE wx_order_press;
CREATE TABLE wx_order_press_81     LIKE wx_order_press;
CREATE TABLE wx_order_press_82     LIKE wx_order_press;
CREATE TABLE wx_order_press_83     LIKE wx_order_press;
CREATE TABLE wx_order_press_84     LIKE wx_order_press;
CREATE TABLE wx_order_press_85     LIKE wx_order_press;
CREATE TABLE wx_order_press_86     LIKE wx_order_press;
CREATE TABLE wx_order_press_87     LIKE wx_order_press;
CREATE TABLE wx_order_press_88     LIKE wx_order_press;
CREATE TABLE wx_order_press_89     LIKE wx_order_press;
CREATE TABLE wx_order_press_90     LIKE wx_order_press;
CREATE TABLE wx_order_press_91     LIKE wx_order_press;
CREATE TABLE wx_order_press_92     LIKE wx_order_press;
CREATE TABLE wx_order_press_93     LIKE wx_order_press;
CREATE TABLE wx_order_press_94     LIKE wx_order_press;
CREATE TABLE wx_order_press_95     LIKE wx_order_press;
CREATE TABLE wx_order_press_96     LIKE wx_order_press;
CREATE TABLE wx_order_press_97     LIKE wx_order_press;
CREATE TABLE wx_order_press_98     LIKE wx_order_press;
CREATE TABLE wx_order_press_99     LIKE wx_order_press;

INSERT INTO wx_order_press_0 SELECT * FROM wx_order_press WHERE tenant_id IN ('1000');
INSERT INTO wx_order_press_1 SELECT * FROM wx_order_press WHERE tenant_id IN ('1','1001');
INSERT INTO wx_order_press_2 SELECT * FROM wx_order_press WHERE tenant_id IN ('1002');
INSERT INTO wx_order_press_3 SELECT * FROM wx_order_press WHERE tenant_id IN ('1003');
INSERT INTO wx_order_press_4 SELECT * FROM wx_order_press WHERE tenant_id IN ('1004');
INSERT INTO wx_order_press_5 SELECT * FROM wx_order_press WHERE tenant_id IN ('1005');
INSERT INTO wx_order_press_6 SELECT * FROM wx_order_press WHERE tenant_id IN ('1006');
INSERT INTO wx_order_press_7 SELECT * FROM wx_order_press WHERE tenant_id IN ('1007');
INSERT INTO wx_order_press_8 SELECT * FROM wx_order_press WHERE tenant_id IN ('1008');
INSERT INTO wx_order_press_9 SELECT * FROM wx_order_press WHERE tenant_id IN ('1009');
INSERT INTO wx_order_press_10 SELECT * FROM wx_order_press WHERE tenant_id IN ('1010');
INSERT INTO wx_order_press_11 SELECT * FROM wx_order_press WHERE tenant_id IN ('1011');
INSERT INTO wx_order_press_12 SELECT * FROM wx_order_press WHERE tenant_id IN ('1012');
INSERT INTO wx_order_press_13 SELECT * FROM wx_order_press WHERE tenant_id IN ('1013');
INSERT INTO wx_order_press_14 SELECT * FROM wx_order_press WHERE tenant_id IN ('1014');
INSERT INTO wx_order_press_15 SELECT * FROM wx_order_press WHERE tenant_id IN ('1015');
INSERT INTO wx_order_press_16 SELECT * FROM wx_order_press WHERE tenant_id IN ('1016');
INSERT INTO wx_order_press_17 SELECT * FROM wx_order_press WHERE tenant_id IN ('1017');
INSERT INTO wx_order_press_18 SELECT * FROM wx_order_press WHERE tenant_id IN ('1018');
INSERT INTO wx_order_press_19 SELECT * FROM wx_order_press WHERE tenant_id IN ('1019');
INSERT INTO wx_order_press_20 SELECT * FROM wx_order_press WHERE tenant_id IN ('1020');
INSERT INTO wx_order_press_21 SELECT * FROM wx_order_press WHERE tenant_id IN ('1021');
INSERT INTO wx_order_press_22 SELECT * FROM wx_order_press WHERE tenant_id IN ('1022');
INSERT INTO wx_order_press_23 SELECT * FROM wx_order_press WHERE tenant_id IN ('1023');
INSERT INTO wx_order_press_24 SELECT * FROM wx_order_press WHERE tenant_id IN ('1024');
INSERT INTO wx_order_press_25 SELECT * FROM wx_order_press WHERE tenant_id IN ('1025');
INSERT INTO wx_order_press_26 SELECT * FROM wx_order_press WHERE tenant_id IN ('1026');
INSERT INTO wx_order_press_27 SELECT * FROM wx_order_press WHERE tenant_id IN ('1027');
INSERT INTO wx_order_press_89 SELECT * FROM wx_order_press WHERE tenant_id IN ('789');
INSERT INTO wx_order_press_88 SELECT * FROM wx_order_press WHERE tenant_id IN ('788');
INSERT INTO wx_order_press_91 SELECT * FROM wx_order_press WHERE tenant_id IN ('791');

alter table wx_order_press rename to wx_order_press_sharing_all; 


CREATE TABLE pos_order_0      LIKE pos_order;
CREATE TABLE pos_order_1      LIKE pos_order;
CREATE TABLE pos_order_2      LIKE pos_order;
CREATE TABLE pos_order_3      LIKE pos_order;
CREATE TABLE pos_order_4      LIKE pos_order;
CREATE TABLE pos_order_5      LIKE pos_order;
CREATE TABLE pos_order_6      LIKE pos_order;
CREATE TABLE pos_order_7      LIKE pos_order;
CREATE TABLE pos_order_8      LIKE pos_order;
CREATE TABLE pos_order_9      LIKE pos_order;
CREATE TABLE pos_order_10     LIKE pos_order;
CREATE TABLE pos_order_11     LIKE pos_order;
CREATE TABLE pos_order_12     LIKE pos_order;
CREATE TABLE pos_order_13     LIKE pos_order;
CREATE TABLE pos_order_14     LIKE pos_order;
CREATE TABLE pos_order_15     LIKE pos_order;
CREATE TABLE pos_order_16     LIKE pos_order;
CREATE TABLE pos_order_17     LIKE pos_order;
CREATE TABLE pos_order_18     LIKE pos_order;
CREATE TABLE pos_order_19     LIKE pos_order;
CREATE TABLE pos_order_20     LIKE pos_order;
CREATE TABLE pos_order_21     LIKE pos_order;
CREATE TABLE pos_order_22     LIKE pos_order;
CREATE TABLE pos_order_23     LIKE pos_order;
CREATE TABLE pos_order_24     LIKE pos_order;
CREATE TABLE pos_order_25     LIKE pos_order;
CREATE TABLE pos_order_26     LIKE pos_order;
CREATE TABLE pos_order_27     LIKE pos_order;
CREATE TABLE pos_order_28     LIKE pos_order;
CREATE TABLE pos_order_29     LIKE pos_order;
CREATE TABLE pos_order_30     LIKE pos_order;
CREATE TABLE pos_order_31     LIKE pos_order;
CREATE TABLE pos_order_32     LIKE pos_order;
CREATE TABLE pos_order_33     LIKE pos_order;
CREATE TABLE pos_order_34     LIKE pos_order;
CREATE TABLE pos_order_35     LIKE pos_order;
CREATE TABLE pos_order_36     LIKE pos_order;
CREATE TABLE pos_order_37     LIKE pos_order;
CREATE TABLE pos_order_38     LIKE pos_order;
CREATE TABLE pos_order_39     LIKE pos_order;
CREATE TABLE pos_order_40     LIKE pos_order;
CREATE TABLE pos_order_41     LIKE pos_order;
CREATE TABLE pos_order_42     LIKE pos_order;
CREATE TABLE pos_order_43     LIKE pos_order;
CREATE TABLE pos_order_44     LIKE pos_order;
CREATE TABLE pos_order_45     LIKE pos_order;
CREATE TABLE pos_order_46     LIKE pos_order;
CREATE TABLE pos_order_47     LIKE pos_order;
CREATE TABLE pos_order_48     LIKE pos_order;
CREATE TABLE pos_order_49     LIKE pos_order;
CREATE TABLE pos_order_50     LIKE pos_order;
CREATE TABLE pos_order_51     LIKE pos_order;
CREATE TABLE pos_order_52     LIKE pos_order;
CREATE TABLE pos_order_53     LIKE pos_order;
CREATE TABLE pos_order_54     LIKE pos_order;
CREATE TABLE pos_order_55     LIKE pos_order;
CREATE TABLE pos_order_56     LIKE pos_order;
CREATE TABLE pos_order_57     LIKE pos_order;
CREATE TABLE pos_order_58     LIKE pos_order;
CREATE TABLE pos_order_59     LIKE pos_order;
CREATE TABLE pos_order_60     LIKE pos_order;
CREATE TABLE pos_order_61     LIKE pos_order;
CREATE TABLE pos_order_62     LIKE pos_order;
CREATE TABLE pos_order_63     LIKE pos_order;
CREATE TABLE pos_order_64     LIKE pos_order;
CREATE TABLE pos_order_65     LIKE pos_order;
CREATE TABLE pos_order_66     LIKE pos_order;
CREATE TABLE pos_order_67     LIKE pos_order;
CREATE TABLE pos_order_68     LIKE pos_order;
CREATE TABLE pos_order_69     LIKE pos_order;
CREATE TABLE pos_order_70     LIKE pos_order;
CREATE TABLE pos_order_71     LIKE pos_order;
CREATE TABLE pos_order_72     LIKE pos_order;
CREATE TABLE pos_order_73     LIKE pos_order;
CREATE TABLE pos_order_74     LIKE pos_order;
CREATE TABLE pos_order_75     LIKE pos_order;
CREATE TABLE pos_order_76     LIKE pos_order;
CREATE TABLE pos_order_77     LIKE pos_order;
CREATE TABLE pos_order_78     LIKE pos_order;
CREATE TABLE pos_order_79     LIKE pos_order;
CREATE TABLE pos_order_80     LIKE pos_order;
CREATE TABLE pos_order_81     LIKE pos_order;
CREATE TABLE pos_order_82     LIKE pos_order;
CREATE TABLE pos_order_83     LIKE pos_order;
CREATE TABLE pos_order_84     LIKE pos_order;
CREATE TABLE pos_order_85     LIKE pos_order;
CREATE TABLE pos_order_86     LIKE pos_order;
CREATE TABLE pos_order_87     LIKE pos_order;
CREATE TABLE pos_order_88     LIKE pos_order;
CREATE TABLE pos_order_89     LIKE pos_order;
CREATE TABLE pos_order_90     LIKE pos_order;
CREATE TABLE pos_order_91     LIKE pos_order;
CREATE TABLE pos_order_92     LIKE pos_order;
CREATE TABLE pos_order_93     LIKE pos_order;
CREATE TABLE pos_order_94     LIKE pos_order;
CREATE TABLE pos_order_95     LIKE pos_order;
CREATE TABLE pos_order_96     LIKE pos_order;
CREATE TABLE pos_order_97     LIKE pos_order;
CREATE TABLE pos_order_98     LIKE pos_order;
CREATE TABLE pos_order_99     LIKE pos_order;


INSERT INTO pos_order_0 SELECT * FROM pos_order WHERE tenant_id IN ('1000');
INSERT INTO pos_order_1 SELECT * FROM pos_order WHERE tenant_id IN ('1','1001');
INSERT INTO pos_order_2 SELECT * FROM pos_order WHERE tenant_id IN ('1002');
INSERT INTO pos_order_3 SELECT * FROM pos_order WHERE tenant_id IN ('1003');
INSERT INTO pos_order_4 SELECT * FROM pos_order WHERE tenant_id IN ('1004');
INSERT INTO pos_order_5 SELECT * FROM pos_order WHERE tenant_id IN ('1005');
INSERT INTO pos_order_6 SELECT * FROM pos_order WHERE tenant_id IN ('1006');
INSERT INTO pos_order_7 SELECT * FROM pos_order WHERE tenant_id IN ('1007');
INSERT INTO pos_order_8 SELECT * FROM pos_order WHERE tenant_id IN ('1008');
INSERT INTO pos_order_9 SELECT * FROM pos_order WHERE tenant_id IN ('1009');
INSERT INTO pos_order_10 SELECT * FROM pos_order WHERE tenant_id IN ('1010');
INSERT INTO pos_order_11 SELECT * FROM pos_order WHERE tenant_id IN ('1011');
INSERT INTO pos_order_12 SELECT * FROM pos_order WHERE tenant_id IN ('1012');
INSERT INTO pos_order_13 SELECT * FROM pos_order WHERE tenant_id IN ('1013');
INSERT INTO pos_order_14 SELECT * FROM pos_order WHERE tenant_id IN ('1014');
INSERT INTO pos_order_15 SELECT * FROM pos_order WHERE tenant_id IN ('1015');
INSERT INTO pos_order_16 SELECT * FROM pos_order WHERE tenant_id IN ('1016');
INSERT INTO pos_order_17 SELECT * FROM pos_order WHERE tenant_id IN ('1017');
INSERT INTO pos_order_18 SELECT * FROM pos_order WHERE tenant_id IN ('1018');
INSERT INTO pos_order_19 SELECT * FROM pos_order WHERE tenant_id IN ('1019');
INSERT INTO pos_order_20 SELECT * FROM pos_order WHERE tenant_id IN ('1020');
INSERT INTO pos_order_21 SELECT * FROM pos_order WHERE tenant_id IN ('1021');
INSERT INTO pos_order_22 SELECT * FROM pos_order WHERE tenant_id IN ('1022');
INSERT INTO pos_order_23 SELECT * FROM pos_order WHERE tenant_id IN ('1023');
INSERT INTO pos_order_24 SELECT * FROM pos_order WHERE tenant_id IN ('1024');
INSERT INTO pos_order_25 SELECT * FROM pos_order WHERE tenant_id IN ('1025');
INSERT INTO pos_order_26 SELECT * FROM pos_order WHERE tenant_id IN ('1026');
INSERT INTO pos_order_27 SELECT * FROM pos_order WHERE tenant_id IN ('1027');
INSERT INTO pos_order_89 SELECT * FROM pos_order WHERE tenant_id IN ('789');
INSERT INTO pos_order_88 SELECT * FROM pos_order WHERE tenant_id IN ('788');
INSERT INTO pos_order_91 SELECT * FROM pos_order WHERE tenant_id IN ('791');

alter table pos_order rename to pos_order_sharing_all;


CREATE TABLE pos_pay_order_0      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_1      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_2      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_3      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_4      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_5      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_6      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_7      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_8      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_9      LIKE pos_pay_order;
CREATE TABLE pos_pay_order_10     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_11     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_12     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_13     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_14     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_15     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_16     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_17     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_18     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_19     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_20     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_21     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_22     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_23     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_24     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_25     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_26     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_27     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_28     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_29     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_30     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_31     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_32     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_33     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_34     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_35     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_36     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_37     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_38     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_39     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_40     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_41     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_42     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_43     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_44     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_45     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_46     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_47     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_48     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_49     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_50     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_51     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_52     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_53     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_54     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_55     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_56     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_57     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_58     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_59     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_60     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_61     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_62     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_63     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_64     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_65     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_66     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_67     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_68     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_69     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_70     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_71     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_72     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_73     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_74     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_75     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_76     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_77     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_78     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_79     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_80     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_81     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_82     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_83     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_84     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_85     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_86     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_87     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_88     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_89     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_90     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_91     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_92     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_93     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_94     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_95     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_96     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_97     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_98     LIKE pos_pay_order;
CREATE TABLE pos_pay_order_99     LIKE pos_pay_order;


INSERT INTO pos_pay_order_0 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1000');
INSERT INTO pos_pay_order_1 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1','1001');
INSERT INTO pos_pay_order_2 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1002');
INSERT INTO pos_pay_order_3 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1003');
INSERT INTO pos_pay_order_4 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1004');
INSERT INTO pos_pay_order_5 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1005');
INSERT INTO pos_pay_order_6 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1006');
INSERT INTO pos_pay_order_7 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1007');
INSERT INTO pos_pay_order_8 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1008');
INSERT INTO pos_pay_order_9 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1009');
INSERT INTO pos_pay_order_10 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1010');
INSERT INTO pos_pay_order_11 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1011');
INSERT INTO pos_pay_order_12 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1012');
INSERT INTO pos_pay_order_13 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1013');
INSERT INTO pos_pay_order_14 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1014');
INSERT INTO pos_pay_order_15 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1015');
INSERT INTO pos_pay_order_16 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1016');
INSERT INTO pos_pay_order_17 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1017');
INSERT INTO pos_pay_order_18 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1018');
INSERT INTO pos_pay_order_19 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1019');
INSERT INTO pos_pay_order_20 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1020');
INSERT INTO pos_pay_order_21 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1021');
INSERT INTO pos_pay_order_22 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1022');
INSERT INTO pos_pay_order_23 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1023');
INSERT INTO pos_pay_order_24 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1024');
INSERT INTO pos_pay_order_25 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1025');
INSERT INTO pos_pay_order_26 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1026');
INSERT INTO pos_pay_order_27 SELECT * FROM pos_pay_order WHERE tenant_id IN ('1027');
INSERT INTO pos_pay_order_89 SELECT * FROM pos_pay_order WHERE tenant_id IN ('789');
INSERT INTO pos_pay_order_88 SELECT * FROM pos_pay_order WHERE tenant_id IN ('788');
INSERT INTO pos_pay_order_91 SELECT * FROM pos_pay_order WHERE tenant_id IN ('791');

alter table pos_pay_order rename to pos_pay_order_sharing_all;


CREATE TABLE wx_score_history_0      LIKE wx_score_history;
CREATE TABLE wx_score_history_1      LIKE wx_score_history;
CREATE TABLE wx_score_history_2      LIKE wx_score_history;
CREATE TABLE wx_score_history_3      LIKE wx_score_history;
CREATE TABLE wx_score_history_4      LIKE wx_score_history;
CREATE TABLE wx_score_history_5      LIKE wx_score_history;
CREATE TABLE wx_score_history_6      LIKE wx_score_history;
CREATE TABLE wx_score_history_7      LIKE wx_score_history;
CREATE TABLE wx_score_history_8      LIKE wx_score_history;
CREATE TABLE wx_score_history_9      LIKE wx_score_history;
CREATE TABLE wx_score_history_10     LIKE wx_score_history;
CREATE TABLE wx_score_history_11     LIKE wx_score_history;
CREATE TABLE wx_score_history_12     LIKE wx_score_history;
CREATE TABLE wx_score_history_13     LIKE wx_score_history;
CREATE TABLE wx_score_history_14     LIKE wx_score_history;
CREATE TABLE wx_score_history_15     LIKE wx_score_history;
CREATE TABLE wx_score_history_16     LIKE wx_score_history;
CREATE TABLE wx_score_history_17     LIKE wx_score_history;
CREATE TABLE wx_score_history_18     LIKE wx_score_history;
CREATE TABLE wx_score_history_19     LIKE wx_score_history;
CREATE TABLE wx_score_history_20     LIKE wx_score_history;
CREATE TABLE wx_score_history_21     LIKE wx_score_history;
CREATE TABLE wx_score_history_22     LIKE wx_score_history;
CREATE TABLE wx_score_history_23     LIKE wx_score_history;
CREATE TABLE wx_score_history_24     LIKE wx_score_history;
CREATE TABLE wx_score_history_25     LIKE wx_score_history;
CREATE TABLE wx_score_history_26     LIKE wx_score_history;
CREATE TABLE wx_score_history_27     LIKE wx_score_history;
CREATE TABLE wx_score_history_28     LIKE wx_score_history;
CREATE TABLE wx_score_history_29     LIKE wx_score_history;
CREATE TABLE wx_score_history_30     LIKE wx_score_history;
CREATE TABLE wx_score_history_31     LIKE wx_score_history;
CREATE TABLE wx_score_history_32     LIKE wx_score_history;
CREATE TABLE wx_score_history_33     LIKE wx_score_history;
CREATE TABLE wx_score_history_34     LIKE wx_score_history;
CREATE TABLE wx_score_history_35     LIKE wx_score_history;
CREATE TABLE wx_score_history_36     LIKE wx_score_history;
CREATE TABLE wx_score_history_37     LIKE wx_score_history;
CREATE TABLE wx_score_history_38     LIKE wx_score_history;
CREATE TABLE wx_score_history_39     LIKE wx_score_history;
CREATE TABLE wx_score_history_40     LIKE wx_score_history;
CREATE TABLE wx_score_history_41     LIKE wx_score_history;
CREATE TABLE wx_score_history_42     LIKE wx_score_history;
CREATE TABLE wx_score_history_43     LIKE wx_score_history;
CREATE TABLE wx_score_history_44     LIKE wx_score_history;
CREATE TABLE wx_score_history_45     LIKE wx_score_history;
CREATE TABLE wx_score_history_46     LIKE wx_score_history;
CREATE TABLE wx_score_history_47     LIKE wx_score_history;
CREATE TABLE wx_score_history_48     LIKE wx_score_history;
CREATE TABLE wx_score_history_49     LIKE wx_score_history;
CREATE TABLE wx_score_history_50     LIKE wx_score_history;
CREATE TABLE wx_score_history_51     LIKE wx_score_history;
CREATE TABLE wx_score_history_52     LIKE wx_score_history;
CREATE TABLE wx_score_history_53     LIKE wx_score_history;
CREATE TABLE wx_score_history_54     LIKE wx_score_history;
CREATE TABLE wx_score_history_55     LIKE wx_score_history;
CREATE TABLE wx_score_history_56     LIKE wx_score_history;
CREATE TABLE wx_score_history_57     LIKE wx_score_history;
CREATE TABLE wx_score_history_58     LIKE wx_score_history;
CREATE TABLE wx_score_history_59     LIKE wx_score_history;
CREATE TABLE wx_score_history_60     LIKE wx_score_history;
CREATE TABLE wx_score_history_61     LIKE wx_score_history;
CREATE TABLE wx_score_history_62     LIKE wx_score_history;
CREATE TABLE wx_score_history_63     LIKE wx_score_history;
CREATE TABLE wx_score_history_64     LIKE wx_score_history;
CREATE TABLE wx_score_history_65     LIKE wx_score_history;
CREATE TABLE wx_score_history_66     LIKE wx_score_history;
CREATE TABLE wx_score_history_67     LIKE wx_score_history;
CREATE TABLE wx_score_history_68     LIKE wx_score_history;
CREATE TABLE wx_score_history_69     LIKE wx_score_history;
CREATE TABLE wx_score_history_70     LIKE wx_score_history;
CREATE TABLE wx_score_history_71     LIKE wx_score_history;
CREATE TABLE wx_score_history_72     LIKE wx_score_history;
CREATE TABLE wx_score_history_73     LIKE wx_score_history;
CREATE TABLE wx_score_history_74     LIKE wx_score_history;
CREATE TABLE wx_score_history_75     LIKE wx_score_history;
CREATE TABLE wx_score_history_76     LIKE wx_score_history;
CREATE TABLE wx_score_history_77     LIKE wx_score_history;
CREATE TABLE wx_score_history_78     LIKE wx_score_history;
CREATE TABLE wx_score_history_79     LIKE wx_score_history;
CREATE TABLE wx_score_history_80     LIKE wx_score_history;
CREATE TABLE wx_score_history_81     LIKE wx_score_history;
CREATE TABLE wx_score_history_82     LIKE wx_score_history;
CREATE TABLE wx_score_history_83     LIKE wx_score_history;
CREATE TABLE wx_score_history_84     LIKE wx_score_history;
CREATE TABLE wx_score_history_85     LIKE wx_score_history;
CREATE TABLE wx_score_history_86     LIKE wx_score_history;
CREATE TABLE wx_score_history_87     LIKE wx_score_history;
CREATE TABLE wx_score_history_88     LIKE wx_score_history;
CREATE TABLE wx_score_history_89     LIKE wx_score_history;
CREATE TABLE wx_score_history_90     LIKE wx_score_history;
CREATE TABLE wx_score_history_91     LIKE wx_score_history;
CREATE TABLE wx_score_history_92     LIKE wx_score_history;
CREATE TABLE wx_score_history_93     LIKE wx_score_history;
CREATE TABLE wx_score_history_94     LIKE wx_score_history;
CREATE TABLE wx_score_history_95     LIKE wx_score_history;
CREATE TABLE wx_score_history_96     LIKE wx_score_history;
CREATE TABLE wx_score_history_97     LIKE wx_score_history;
CREATE TABLE wx_score_history_98     LIKE wx_score_history;
CREATE TABLE wx_score_history_99     LIKE wx_score_history;


INSERT INTO wx_score_history_0 SELECT * FROM wx_score_history WHERE tenant_id IN ('1000');
INSERT INTO wx_score_history_1 SELECT * FROM wx_score_history WHERE tenant_id IN ('1','1001');
INSERT INTO wx_score_history_2 SELECT * FROM wx_score_history WHERE tenant_id IN ('1002');
INSERT INTO wx_score_history_3 SELECT * FROM wx_score_history WHERE tenant_id IN ('1003');
INSERT INTO wx_score_history_4 SELECT * FROM wx_score_history WHERE tenant_id IN ('1004');
INSERT INTO wx_score_history_5 SELECT * FROM wx_score_history WHERE tenant_id IN ('1005');
INSERT INTO wx_score_history_6 SELECT * FROM wx_score_history WHERE tenant_id IN ('1006');
INSERT INTO wx_score_history_7 SELECT * FROM wx_score_history WHERE tenant_id IN ('1007');
INSERT INTO wx_score_history_8 SELECT * FROM wx_score_history WHERE tenant_id IN ('1008');
INSERT INTO wx_score_history_9 SELECT * FROM wx_score_history WHERE tenant_id IN ('1009');
INSERT INTO wx_score_history_10 SELECT * FROM wx_score_history WHERE tenant_id IN ('1010');
INSERT INTO wx_score_history_11 SELECT * FROM wx_score_history WHERE tenant_id IN ('1011');
INSERT INTO wx_score_history_12 SELECT * FROM wx_score_history WHERE tenant_id IN ('1012');
INSERT INTO wx_score_history_13 SELECT * FROM wx_score_history WHERE tenant_id IN ('1013');
INSERT INTO wx_score_history_14 SELECT * FROM wx_score_history WHERE tenant_id IN ('1014');
INSERT INTO wx_score_history_15 SELECT * FROM wx_score_history WHERE tenant_id IN ('1015');
INSERT INTO wx_score_history_16 SELECT * FROM wx_score_history WHERE tenant_id IN ('1016');
INSERT INTO wx_score_history_17 SELECT * FROM wx_score_history WHERE tenant_id IN ('1017');
INSERT INTO wx_score_history_18 SELECT * FROM wx_score_history WHERE tenant_id IN ('1018');
INSERT INTO wx_score_history_19 SELECT * FROM wx_score_history WHERE tenant_id IN ('1019');
INSERT INTO wx_score_history_20 SELECT * FROM wx_score_history WHERE tenant_id IN ('1020');
INSERT INTO wx_score_history_21 SELECT * FROM wx_score_history WHERE tenant_id IN ('1021');
INSERT INTO wx_score_history_22 SELECT * FROM wx_score_history WHERE tenant_id IN ('1022');
INSERT INTO wx_score_history_23 SELECT * FROM wx_score_history WHERE tenant_id IN ('1023');
INSERT INTO wx_score_history_24 SELECT * FROM wx_score_history WHERE tenant_id IN ('1024');
INSERT INTO wx_score_history_25 SELECT * FROM wx_score_history WHERE tenant_id IN ('1025');
INSERT INTO wx_score_history_26 SELECT * FROM wx_score_history WHERE tenant_id IN ('1026');
INSERT INTO wx_score_history_27 SELECT * FROM wx_score_history WHERE tenant_id IN ('1027');
INSERT INTO wx_score_history_89 SELECT * FROM wx_score_history WHERE tenant_id IN ('789');
INSERT INTO wx_score_history_88 SELECT * FROM wx_score_history WHERE tenant_id IN ('788');
INSERT INTO wx_score_history_91 SELECT * FROM wx_score_history WHERE tenant_id IN ('791');

alter table wx_score_history rename to wx_score_history_sharing_all;


CREATE TABLE wx_credit_history_0      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_1      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_2      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_3      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_4      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_5      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_6      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_7      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_8      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_9      LIKE wx_credit_history;
CREATE TABLE wx_credit_history_10     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_11     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_12     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_13     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_14     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_15     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_16     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_17     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_18     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_19     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_20     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_21     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_22     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_23     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_24     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_25     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_26     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_27     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_28     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_29     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_30     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_31     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_32     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_33     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_34     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_35     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_36     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_37     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_38     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_39     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_40     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_41     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_42     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_43     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_44     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_45     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_46     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_47     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_48     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_49     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_50     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_51     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_52     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_53     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_54     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_55     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_56     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_57     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_58     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_59     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_60     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_61     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_62     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_63     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_64     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_65     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_66     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_67     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_68     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_69     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_70     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_71     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_72     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_73     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_74     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_75     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_76     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_77     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_78     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_79     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_80     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_81     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_82     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_83     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_84     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_85     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_86     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_87     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_88     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_89     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_90     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_91     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_92     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_93     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_94     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_95     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_96     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_97     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_98     LIKE wx_credit_history;
CREATE TABLE wx_credit_history_99     LIKE wx_credit_history;


INSERT INTO wx_credit_history_0 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1000');
INSERT INTO wx_credit_history_1 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1','1001');
INSERT INTO wx_credit_history_2 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1002');
INSERT INTO wx_credit_history_3 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1003');
INSERT INTO wx_credit_history_4 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1004');
INSERT INTO wx_credit_history_5 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1005');
INSERT INTO wx_credit_history_6 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1006');
INSERT INTO wx_credit_history_7 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1007');
INSERT INTO wx_credit_history_8 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1008');
INSERT INTO wx_credit_history_9 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1009');
INSERT INTO wx_credit_history_10 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1010');
INSERT INTO wx_credit_history_11 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1011');
INSERT INTO wx_credit_history_12 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1012');
INSERT INTO wx_credit_history_13 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1013');
INSERT INTO wx_credit_history_14 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1014');
INSERT INTO wx_credit_history_15 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1015');
INSERT INTO wx_credit_history_16 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1016');
INSERT INTO wx_credit_history_17 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1017');
INSERT INTO wx_credit_history_18 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1018');
INSERT INTO wx_credit_history_19 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1019');
INSERT INTO wx_credit_history_20 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1020');
INSERT INTO wx_credit_history_21 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1021');
INSERT INTO wx_credit_history_22 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1022');
INSERT INTO wx_credit_history_23 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1023');
INSERT INTO wx_credit_history_24 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1024');
INSERT INTO wx_credit_history_25 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1025');
INSERT INTO wx_credit_history_26 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1026');
INSERT INTO wx_credit_history_27 SELECT * FROM wx_credit_history WHERE tenant_id IN ('1027');
INSERT INTO wx_credit_history_89 SELECT * FROM wx_credit_history WHERE tenant_id IN ('789');
INSERT INTO wx_credit_history_88 SELECT * FROM wx_credit_history WHERE tenant_id IN ('788');
INSERT INTO wx_credit_history_91 SELECT * FROM wx_credit_history WHERE tenant_id IN ('791');

alter table wx_credit_history rename to wx_credit_history_sharing_all;



CREATE TABLE wx_car_cmd_log_0      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_1      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_2      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_3      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_4      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_5      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_6      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_7      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_8      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_9      LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_10     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_11     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_12     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_13     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_14     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_15     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_16     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_17     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_18     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_19     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_20     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_21     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_22     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_23     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_24     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_25     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_26     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_27     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_28     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_29     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_30     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_31     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_32     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_33     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_34     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_35     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_36     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_37     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_38     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_39     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_40     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_41     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_42     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_43     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_44     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_45     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_46     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_47     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_48     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_49     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_50     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_51     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_52     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_53     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_54     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_55     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_56     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_57     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_58     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_59     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_60     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_61     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_62     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_63     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_64     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_65     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_66     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_67     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_68     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_69     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_70     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_71     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_72     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_73     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_74     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_75     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_76     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_77     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_78     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_79     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_80     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_81     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_82     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_83     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_84     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_85     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_86     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_87     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_88     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_89     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_90     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_91     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_92     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_93     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_94     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_95     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_96     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_97     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_98     LIKE wx_car_cmd_log;
CREATE TABLE wx_car_cmd_log_99     LIKE wx_car_cmd_log;


INSERT INTO wx_car_cmd_log_0 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1000');
INSERT INTO wx_car_cmd_log_1 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1','1001');
INSERT INTO wx_car_cmd_log_2 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1002');
INSERT INTO wx_car_cmd_log_3 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1003');
INSERT INTO wx_car_cmd_log_4 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1004');
INSERT INTO wx_car_cmd_log_5 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1005');
INSERT INTO wx_car_cmd_log_6 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1006');
INSERT INTO wx_car_cmd_log_7 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1007');
INSERT INTO wx_car_cmd_log_8 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1008');
INSERT INTO wx_car_cmd_log_9 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1009');
INSERT INTO wx_car_cmd_log_10 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1010');
INSERT INTO wx_car_cmd_log_11 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1011');
INSERT INTO wx_car_cmd_log_12 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1012');
INSERT INTO wx_car_cmd_log_13 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1013');
INSERT INTO wx_car_cmd_log_14 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1014');
INSERT INTO wx_car_cmd_log_15 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1015');
INSERT INTO wx_car_cmd_log_16 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1016');
INSERT INTO wx_car_cmd_log_17 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1017');
INSERT INTO wx_car_cmd_log_18 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1018');
INSERT INTO wx_car_cmd_log_19 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1019');
INSERT INTO wx_car_cmd_log_20 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1020');
INSERT INTO wx_car_cmd_log_21 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1021');
INSERT INTO wx_car_cmd_log_22 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1022');
INSERT INTO wx_car_cmd_log_23 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1023');
INSERT INTO wx_car_cmd_log_24 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1024');
INSERT INTO wx_car_cmd_log_25 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1025');
INSERT INTO wx_car_cmd_log_26 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1026');
INSERT INTO wx_car_cmd_log_27 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('1027');
INSERT INTO wx_car_cmd_log_89 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('789');
INSERT INTO wx_car_cmd_log_88 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('788');
INSERT INTO wx_car_cmd_log_91 SELECT * FROM wx_car_cmd_log WHERE tenant_id IN ('791');

alter table wx_car_cmd_log rename to wx_car_cmd_log_sharing_all;


CREATE TABLE wx_merchant_subsidy_0      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_1      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_2      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_3      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_4      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_5      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_6      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_7      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_8      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_9      LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_10     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_11     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_12     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_13     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_14     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_15     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_16     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_17     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_18     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_19     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_20     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_21     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_22     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_23     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_24     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_25     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_26     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_27     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_28     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_29     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_30     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_31     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_32     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_33     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_34     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_35     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_36     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_37     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_38     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_39     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_40     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_41     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_42     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_43     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_44     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_45     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_46     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_47     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_48     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_49     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_50     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_51     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_52     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_53     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_54     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_55     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_56     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_57     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_58     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_59     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_60     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_61     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_62     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_63     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_64     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_65     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_66     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_67     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_68     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_69     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_70     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_71     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_72     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_73     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_74     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_75     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_76     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_77     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_78     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_79     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_80     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_81     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_82     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_83     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_84     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_85     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_86     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_87     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_88     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_89     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_90     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_91     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_92     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_93     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_94     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_95     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_96     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_97     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_98     LIKE wx_merchant_subsidy;
CREATE TABLE wx_merchant_subsidy_99     LIKE wx_merchant_subsidy;


INSERT INTO wx_merchant_subsidy_0 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1000');
INSERT INTO wx_merchant_subsidy_1 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1','1001');
INSERT INTO wx_merchant_subsidy_2 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1002');
INSERT INTO wx_merchant_subsidy_3 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1003');
INSERT INTO wx_merchant_subsidy_4 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1004');
INSERT INTO wx_merchant_subsidy_5 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1005');
INSERT INTO wx_merchant_subsidy_6 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1006');
INSERT INTO wx_merchant_subsidy_7 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1007');
INSERT INTO wx_merchant_subsidy_8 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1008');
INSERT INTO wx_merchant_subsidy_9 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1009');
INSERT INTO wx_merchant_subsidy_10 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1010');
INSERT INTO wx_merchant_subsidy_11 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1011');
INSERT INTO wx_merchant_subsidy_12 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1012');
INSERT INTO wx_merchant_subsidy_13 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1013');
INSERT INTO wx_merchant_subsidy_14 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1014');
INSERT INTO wx_merchant_subsidy_15 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1015');
INSERT INTO wx_merchant_subsidy_16 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1016');
INSERT INTO wx_merchant_subsidy_17 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1017');
INSERT INTO wx_merchant_subsidy_18 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1018');
INSERT INTO wx_merchant_subsidy_19 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1019');
INSERT INTO wx_merchant_subsidy_20 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1020');
INSERT INTO wx_merchant_subsidy_21 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1021');
INSERT INTO wx_merchant_subsidy_22 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1022');
INSERT INTO wx_merchant_subsidy_23 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1023');
INSERT INTO wx_merchant_subsidy_24 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1024');
INSERT INTO wx_merchant_subsidy_25 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1025');
INSERT INTO wx_merchant_subsidy_26 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1026');
INSERT INTO wx_merchant_subsidy_27 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('1027');
INSERT INTO wx_merchant_subsidy_89 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('789');
INSERT INTO wx_merchant_subsidy_88 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('788');
INSERT INTO wx_merchant_subsidy_91 SELECT * FROM wx_merchant_subsidy WHERE tenant_id IN ('791');

alter table wx_merchant_subsidy rename to wx_merchant_subsidy_sharing_all;


CREATE TABLE wx_profit_sharing_order_0      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_1      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_2      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_3      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_4      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_5      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_6      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_7      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_8      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_9      LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_10     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_11     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_12     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_13     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_14     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_15     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_16     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_17     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_18     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_19     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_20     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_21     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_22     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_23     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_24     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_25     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_26     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_27     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_28     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_29     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_30     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_31     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_32     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_33     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_34     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_35     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_36     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_37     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_38     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_39     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_40     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_41     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_42     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_43     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_44     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_45     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_46     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_47     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_48     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_49     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_50     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_51     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_52     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_53     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_54     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_55     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_56     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_57     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_58     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_59     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_60     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_61     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_62     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_63     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_64     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_65     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_66     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_67     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_68     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_69     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_70     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_71     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_72     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_73     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_74     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_75     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_76     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_77     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_78     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_79     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_80     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_81     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_82     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_83     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_84     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_85     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_86     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_87     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_88     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_89     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_90     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_91     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_92     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_93     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_94     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_95     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_96     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_97     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_98     LIKE wx_profit_sharing_order;
CREATE TABLE wx_profit_sharing_order_99     LIKE wx_profit_sharing_order;

INSERT INTO wx_profit_sharing_order_0 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1000');
INSERT INTO wx_profit_sharing_order_1 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1','1001');
INSERT INTO wx_profit_sharing_order_2 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1002');
INSERT INTO wx_profit_sharing_order_3 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1003');
INSERT INTO wx_profit_sharing_order_4 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1004');
INSERT INTO wx_profit_sharing_order_5 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1005');
INSERT INTO wx_profit_sharing_order_6 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1006');
INSERT INTO wx_profit_sharing_order_7 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1007');
INSERT INTO wx_profit_sharing_order_8 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1008');
INSERT INTO wx_profit_sharing_order_9 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1009');
INSERT INTO wx_profit_sharing_order_10 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1010');
INSERT INTO wx_profit_sharing_order_11 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1011');
INSERT INTO wx_profit_sharing_order_12 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1012');
INSERT INTO wx_profit_sharing_order_13 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1013');
INSERT INTO wx_profit_sharing_order_14 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1014');
INSERT INTO wx_profit_sharing_order_15 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1015');
INSERT INTO wx_profit_sharing_order_16 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1016');
INSERT INTO wx_profit_sharing_order_17 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1017');
INSERT INTO wx_profit_sharing_order_18 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1018');
INSERT INTO wx_profit_sharing_order_19 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1019');
INSERT INTO wx_profit_sharing_order_20 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1020');
INSERT INTO wx_profit_sharing_order_21 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1021');
INSERT INTO wx_profit_sharing_order_22 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1022');
INSERT INTO wx_profit_sharing_order_23 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1023');
INSERT INTO wx_profit_sharing_order_24 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1024');
INSERT INTO wx_profit_sharing_order_25 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1025');
INSERT INTO wx_profit_sharing_order_26 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1026');
INSERT INTO wx_profit_sharing_order_27 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('1027');
INSERT INTO wx_profit_sharing_order_89 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('789');
INSERT INTO wx_profit_sharing_order_88 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('788');
INSERT INTO wx_profit_sharing_order_91 SELECT * FROM wx_profit_sharing_order WHERE tenant_id IN ('791');

alter table wx_profit_sharing_order rename to wx_profit_sharing_order_sharing_all;

CREATE TABLE wx_coupon_action_log_0      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_1      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_2      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_3      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_4      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_5      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_6      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_7      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_8      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_9      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_10     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_11     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_12     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_13     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_14     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_15     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_16     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_17     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_18     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_19     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_20     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_21     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_22     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_23     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_24     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_25     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_26     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_27     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_28     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_29     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_30     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_31     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_32     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_33     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_34     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_35     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_36     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_37     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_38     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_39     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_40     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_41     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_42     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_43     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_44     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_45     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_46     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_47     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_48     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_49     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_50     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_51     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_52     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_53     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_54     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_55     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_56     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_57     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_58     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_59     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_60     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_61     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_62     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_63     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_64     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_65     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_66     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_67     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_68     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_69     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_70     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_71     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_72     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_73     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_74     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_75     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_76     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_77     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_78     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_79     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_80     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_81     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_82     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_83     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_84     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_85     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_86     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_87     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_88     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_89     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_90     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_91     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_92     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_93     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_94     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_95     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_96     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_97     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_98     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_99     LIKE wx_coupon_action_log;

INSERT INTO wx_coupon_action_log_0 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1000');
INSERT INTO wx_coupon_action_log_1 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1','1001');
INSERT INTO wx_coupon_action_log_2 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1002');
INSERT INTO wx_coupon_action_log_3 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1003');
INSERT INTO wx_coupon_action_log_4 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1004');
INSERT INTO wx_coupon_action_log_5 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1005');
INSERT INTO wx_coupon_action_log_6 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1006');
INSERT INTO wx_coupon_action_log_7 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1007');
INSERT INTO wx_coupon_action_log_8 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1008');
INSERT INTO wx_coupon_action_log_9 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1009');
INSERT INTO wx_coupon_action_log_10 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1010');
INSERT INTO wx_coupon_action_log_11 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1011');
INSERT INTO wx_coupon_action_log_12 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1012');
INSERT INTO wx_coupon_action_log_13 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1013');
INSERT INTO wx_coupon_action_log_14 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1014');
INSERT INTO wx_coupon_action_log_15 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1015');
INSERT INTO wx_coupon_action_log_16 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1016');
INSERT INTO wx_coupon_action_log_17 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1017');
INSERT INTO wx_coupon_action_log_18 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1018');
INSERT INTO wx_coupon_action_log_19 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1019');
INSERT INTO wx_coupon_action_log_20 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1020');
INSERT INTO wx_coupon_action_log_21 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1021');
INSERT INTO wx_coupon_action_log_22 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1022');
INSERT INTO wx_coupon_action_log_23 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1023');
INSERT INTO wx_coupon_action_log_24 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1024');
INSERT INTO wx_coupon_action_log_25 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1025');
INSERT INTO wx_coupon_action_log_26 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1026');
INSERT INTO wx_coupon_action_log_27 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1027');
INSERT INTO wx_coupon_action_log_89 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('789');
INSERT INTO wx_coupon_action_log_88 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('788');
INSERT INTO wx_coupon_action_log_91 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('791');

alter table wx_coupon_action_log rename to wx_coupon_action_log_sharing_all;

CREATE TABLE wx_coupon_action_log_0      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_1      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_2      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_3      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_4      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_5      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_6      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_7      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_8      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_9      LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_10     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_11     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_12     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_13     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_14     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_15     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_16     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_17     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_18     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_19     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_20     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_21     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_22     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_23     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_24     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_25     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_26     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_27     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_28     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_29     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_30     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_31     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_32     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_33     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_34     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_35     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_36     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_37     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_38     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_39     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_40     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_41     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_42     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_43     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_44     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_45     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_46     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_47     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_48     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_49     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_50     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_51     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_52     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_53     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_54     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_55     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_56     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_57     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_58     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_59     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_60     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_61     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_62     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_63     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_64     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_65     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_66     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_67     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_68     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_69     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_70     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_71     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_72     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_73     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_74     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_75     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_76     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_77     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_78     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_79     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_80     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_81     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_82     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_83     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_84     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_85     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_86     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_87     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_88     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_89     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_90     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_91     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_92     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_93     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_94     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_95     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_96     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_97     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_98     LIKE wx_coupon_action_log;
CREATE TABLE wx_coupon_action_log_99     LIKE wx_coupon_action_log;


INSERT INTO wx_coupon_action_log_0 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1000');
INSERT INTO wx_coupon_action_log_1 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1','1001');
INSERT INTO wx_coupon_action_log_2 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1002');
INSERT INTO wx_coupon_action_log_3 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1003');
INSERT INTO wx_coupon_action_log_4 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1004');
INSERT INTO wx_coupon_action_log_5 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1005');
INSERT INTO wx_coupon_action_log_6 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1006');
INSERT INTO wx_coupon_action_log_7 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1007');
INSERT INTO wx_coupon_action_log_8 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1008');
INSERT INTO wx_coupon_action_log_9 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1009');
INSERT INTO wx_coupon_action_log_10 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1010');
INSERT INTO wx_coupon_action_log_11 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1011');
INSERT INTO wx_coupon_action_log_12 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1012');
INSERT INTO wx_coupon_action_log_13 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1013');
INSERT INTO wx_coupon_action_log_14 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1014');
INSERT INTO wx_coupon_action_log_15 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1015');
INSERT INTO wx_coupon_action_log_16 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1016');
INSERT INTO wx_coupon_action_log_17 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1017');
INSERT INTO wx_coupon_action_log_18 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1018');
INSERT INTO wx_coupon_action_log_19 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1019');
INSERT INTO wx_coupon_action_log_20 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1020');
INSERT INTO wx_coupon_action_log_21 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1021');
INSERT INTO wx_coupon_action_log_22 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1022');
INSERT INTO wx_coupon_action_log_23 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1023');
INSERT INTO wx_coupon_action_log_24 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1024');
INSERT INTO wx_coupon_action_log_25 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1025');
INSERT INTO wx_coupon_action_log_26 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1026');
INSERT INTO wx_coupon_action_log_27 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('1027');
INSERT INTO wx_coupon_action_log_89 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('789');
INSERT INTO wx_coupon_action_log_88 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('788');
INSERT INTO wx_coupon_action_log_91 SELECT * FROM wx_coupon_action_log WHERE tenant_id IN ('791');

alter table wx_coupon_action_log rename to wx_coupon_action_log_sharing_all;

CREATE TABLE wx_c_user_tags_0      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_1      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_2      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_3      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_4      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_5      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_6      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_7      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_8      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_9      LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_10     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_11     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_12     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_13     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_14     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_15     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_16     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_17     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_18     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_19     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_20     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_21     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_22     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_23     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_24     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_25     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_26     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_27     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_28     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_29     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_30     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_31     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_32     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_33     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_34     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_35     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_36     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_37     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_38     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_39     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_40     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_41     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_42     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_43     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_44     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_45     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_46     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_47     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_48     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_49     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_50     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_51     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_52     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_53     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_54     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_55     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_56     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_57     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_58     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_59     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_60     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_61     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_62     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_63     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_64     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_65     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_66     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_67     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_68     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_69     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_70     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_71     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_72     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_73     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_74     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_75     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_76     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_77     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_78     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_79     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_80     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_81     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_82     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_83     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_84     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_85     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_86     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_87     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_88     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_89     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_90     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_91     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_92     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_93     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_94     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_95     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_96     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_97     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_98     LIKE wx_c_user_tags;
CREATE TABLE wx_c_user_tags_99     LIKE wx_c_user_tags;


INSERT INTO wx_c_user_tags_0 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1000');
INSERT INTO wx_c_user_tags_1 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1','1001');
INSERT INTO wx_c_user_tags_2 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1002');
INSERT INTO wx_c_user_tags_3 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1003');
INSERT INTO wx_c_user_tags_4 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1004');
INSERT INTO wx_c_user_tags_5 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1005');
INSERT INTO wx_c_user_tags_6 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1006');
INSERT INTO wx_c_user_tags_7 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1007');
INSERT INTO wx_c_user_tags_8 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1008');
INSERT INTO wx_c_user_tags_9 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1009');
INSERT INTO wx_c_user_tags_10 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1010');
INSERT INTO wx_c_user_tags_11 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1011');
INSERT INTO wx_c_user_tags_12 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1012');
INSERT INTO wx_c_user_tags_13 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1013');
INSERT INTO wx_c_user_tags_14 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1014');
INSERT INTO wx_c_user_tags_15 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1015');
INSERT INTO wx_c_user_tags_16 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1016');
INSERT INTO wx_c_user_tags_17 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1017');
INSERT INTO wx_c_user_tags_18 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1018');
INSERT INTO wx_c_user_tags_19 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1019');
INSERT INTO wx_c_user_tags_20 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1020');
INSERT INTO wx_c_user_tags_21 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1021');
INSERT INTO wx_c_user_tags_22 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1022');
INSERT INTO wx_c_user_tags_23 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1023');
INSERT INTO wx_c_user_tags_24 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1024');
INSERT INTO wx_c_user_tags_25 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1025');
INSERT INTO wx_c_user_tags_26 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1026');
INSERT INTO wx_c_user_tags_27 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('1027');
INSERT INTO wx_c_user_tags_89 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('789');
INSERT INTO wx_c_user_tags_88 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('788');
INSERT INTO wx_c_user_tags_91 SELECT * FROM wx_c_user_tags WHERE tenant_id IN ('791');

alter table wx_c_user_tags rename to wx_c_user_tags_sharing_all;