737 lines
		
	
	
		
			20 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			737 lines
		
	
	
		
			20 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| --disable_query_log
 | |
| set @@session.explicit_defaults_for_timestamp=off;
 | |
| --enable_query_log
 | |
| #owner : jim.wjh
 | |
| #owner group: sql2
 | |
| #description: todo
 | |
| --disable_warnings
 | |
| drop database if exists createsql;
 | |
| --enable_warnings
 | |
| create database createsql;
 | |
| use createsql;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_chenfeng_custid_shishi_000(
 | |
|     thedate datetime(6),
 | |
|     puttype int,
 | |
|     sourcetype int,
 | |
|     clickprice int,
 | |
|     click int,
 | |
|     custid int,
 | |
|     impression int,
 | |
|     PRIMARY KEY (custid,thedate,puttype,sourcetype)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_solar_feed_bidword_ob_000(
 | |
|     bidwordid int,
 | |
|     searchtype int,
 | |
|     thedate datetime(6),
 | |
|     adgroupid int,
 | |
|     freeclick int,
 | |
|     directtransactionshipping int,
 | |
|     matchscope int,
 | |
|     memberid int,
 | |
|     feedid int,
 | |
|     favshoptotal int,
 | |
|     cost int,
 | |
|     campaignid int,
 | |
|     favitemtotal int,
 | |
|     indirecttransaction int,
 | |
|     gmt_created datetime default now(),
 | |
|     gmt_modified datetime default now(),
 | |
|     directtransaction int,
 | |
|     indirecttransactionshipping int,
 | |
|     network int,
 | |
|     invalidclick int,
 | |
|     bidwordstr varchar(300),
 | |
|     custid int,
 | |
|     impression int,
 | |
|     itemid int,
 | |
|     click int,
 | |
|     ranksum int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,adgroupid,bidwordid,feedid,network,matchscope)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_chenfeng_campaignid_lixian_000(
 | |
|     thedate datetime(6),
 | |
|     sourcetype int,
 | |
|     custid int,
 | |
|     impression int,
 | |
|     puttype int,
 | |
|     campaignid int,
 | |
|     clickprice int,
 | |
|     click int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,puttype,sourcetype)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_bidword_ob_000(
 | |
|     click int,
 | |
|     bidwordstr varchar(300),
 | |
|     custid int,
 | |
|     onefavshoptotal int,
 | |
|     directtransaction int,
 | |
|     invalidclick int,
 | |
|     network int,
 | |
|     campaignid int,
 | |
|     cost int,
 | |
|     favitemtotal int,
 | |
|     adgroupid int,
 | |
|     memberid int,
 | |
|     sevenindirecttransactionshipping int,
 | |
|     fifteenfavitemtotal int,
 | |
|     thedate datetime(6),
 | |
|     fifteenindirecttransactionshipping int,
 | |
|     isshop int,
 | |
|     fifteenfavshoptotal int,
 | |
|     fifteendirecttransactionshipping int,
 | |
|     threeindirecttransactionshipping int,
 | |
|     ranksum int,
 | |
|     sevenfavitemtotal int,
 | |
|     impression int,
 | |
|     threefavshoptotal int,
 | |
|     sevenindirecttransaction int,
 | |
|     indirecttransactionshipping int,
 | |
|     onedirecttransactionshipping int,
 | |
|     onefavitemtotal int,
 | |
|     indirecttransaction int,
 | |
|     threeindirecttransaction int,
 | |
|     sevendirecttransactionshipping int,
 | |
|     sevendirecttransaction int,
 | |
|     sevenfavshoptotal int,
 | |
|     fifteenindirecttransaction int,
 | |
|     favshoptotal int,
 | |
|     onedirecttransaction int,
 | |
|     oneindirecttransactionshipping int,
 | |
|     matchscope int,
 | |
|     directtransactionshipping int,
 | |
|     threefavitemtotal int,
 | |
|     fifteendirecttransaction int,
 | |
|     threedirecttransactionshipping int,
 | |
|     oneindirecttransaction int,
 | |
|     threedirecttransaction int,
 | |
|     bidwordid int,
 | |
|     searchtype int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,adgroupid,bidwordid,network,matchscope)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_adgroupplace_name_000(
 | |
|     placeid int,
 | |
|     placename varchar(100),
 | |
|     thedate datetime(6),
 | |
|     PRIMARY KEY (placeid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_chenfeng_custid_shishi_accumulative_000(
 | |
|     custid int,
 | |
|     impression int,
 | |
|     sourcetype int,
 | |
|     puttype int,
 | |
|     thedate datetime(6),
 | |
|     clickprice int,
 | |
|     click int,
 | |
|     PRIMARY KEY (custid,thedate,puttype,sourcetype)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_querysession_ob_000(
 | |
|     relword varchar(3000),
 | |
|     originalword varchar(300),
 | |
|     PRIMARY KEY (originalword)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_area_ob_000(
 | |
|     onedirecttransaction int,
 | |
|     favshoptotal int,
 | |
|     threefavitemtotal int,
 | |
|     oneindirecttransactionshipping int,
 | |
|     directtransactionshipping int,
 | |
|     provinceid int,
 | |
|     threedirecttransactionshipping int,
 | |
|     fifteendirecttransaction int,
 | |
|     oneindirecttransaction int,
 | |
|     threedirecttransaction int,
 | |
|     ext2 int,
 | |
|     threeindirecttransactionshipping int,
 | |
|     threefavshoptotal int,
 | |
|     impression int,
 | |
|     sevenfavitemtotal int,
 | |
|     ext1 int,
 | |
|     onedirecttransactionshipping int,
 | |
|     indirecttransactionshipping int,
 | |
|     onefavitemtotal int,
 | |
|     sevenindirecttransaction int,
 | |
|     sevenfavshoptotal int,
 | |
|     fifteenindirecttransaction int,
 | |
|     sevendirecttransaction int,
 | |
|     cityid int,
 | |
|     sevendirecttransactionshipping int,
 | |
|     threeindirecttransaction int,
 | |
|     indirecttransaction int,
 | |
|     favitemtotal int,
 | |
|     productid int,
 | |
|     campaignid int,
 | |
|     cost int,
 | |
|     sevenindirecttransactionshipping int,
 | |
|     memberid int,
 | |
|     fifteenfavshoptotal int,
 | |
|     fifteenfavitemtotal int,
 | |
|     fifteenindirecttransactionshipping int,
 | |
|     thedate datetime(6),
 | |
|     fifteendirecttransactionshipping int,
 | |
|     click int,
 | |
|     traffictype int,
 | |
|     custid int,
 | |
|     invalidclick int,
 | |
|     productline int,
 | |
|     directtransaction int,
 | |
|     onefavshoptotal int,
 | |
|     mechanism int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,traffictype,mechanism,provinceid,cityid,productline,productid,ext1,ext2)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_insight_bidword_area_000(
 | |
|     indirecttransaction int,
 | |
|     mechanism int,
 | |
|     competition int,
 | |
|     area int,
 | |
|     indirecttransactionshipping int,
 | |
|     network int,
 | |
|     ext1 int,
 | |
|     directtransaction int,
 | |
|     bidwordstr varchar(300),
 | |
|     impression int,
 | |
|     click int,
 | |
|     ext2 int,
 | |
|     thedate datetime(6),
 | |
|     directtransactionshipping int,
 | |
|     bidwordhash int,
 | |
|     cost int,
 | |
|     favshoptotal int,
 | |
|     favitemtotal int,
 | |
|     PRIMARY KEY (bidwordhash,thedate,area,network,mechanism,ext1,ext2,bidwordstr)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_solar_feed_name_000(
 | |
|     gmt_created datetime default now(),
 | |
|     gmt_modified datetime default now(),
 | |
|     thedate datetime(6),
 | |
|     linkurl varchar(1024),
 | |
|     adgroupid int,
 | |
|     custid int,
 | |
|     title varchar(1024),
 | |
|     memberid int,
 | |
|     imgurl varchar(1024),
 | |
|     feedid int,
 | |
|     campaignid int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,adgroupid,feedid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_chenfeng_custid_lixian_accumulative_000(
 | |
|     clickprice int,
 | |
|     click int,
 | |
|     sourcetype int,
 | |
|     puttype int,
 | |
|     thedate datetime(6),
 | |
|     impression int,
 | |
|     custid int,
 | |
|     PRIMARY KEY (custid,thedate,puttype,sourcetype)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_creative_name_000(
 | |
|     is_shop int,
 | |
|     thedate datetime(6),
 | |
|     linkurl varchar(1024),
 | |
|     adgroupid int,
 | |
|     title varchar(1024),
 | |
|     custid int,
 | |
|     creativeid int,
 | |
|     memberid int,
 | |
|     imgurl varchar(1024),
 | |
|     campaignid int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,adgroupid,creativeid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_demographic_name_000(
 | |
|     name varchar(100),
 | |
|     demographicid int,
 | |
|     thedate datetime(6),
 | |
|     PRIMARY KEY (demographicid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_demographic_name_star_000(
 | |
|     thedate datetime(6),
 | |
|     demographicid int,
 | |
|     name varchar(100),
 | |
|     PRIMARY KEY (demographicid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_solar_item_ob_000(
 | |
|     indirecttransactionshipping int,
 | |
|     ext1 int,
 | |
|     onedirecttransactionshipping int,
 | |
|     onefavitemtotal int,
 | |
|     sevenindirecttransaction int,
 | |
|     fifteenindirecttransaction int,
 | |
|     sevenfavshoptotal int,
 | |
|     productlineid int,
 | |
|     sevendirecttransaction int,
 | |
|     sevendirecttransactionshipping int,
 | |
|     threeindirecttransaction int,
 | |
|     indirecttransaction int,
 | |
|     ranksum int,
 | |
|     ext2 int,
 | |
|     threeindirecttransactionshipping int,
 | |
|     threefavshoptotal int,
 | |
|     impression int,
 | |
|     sevenfavitemtotal int,
 | |
|     creativeid int,
 | |
|     threedirecttransactionshipping int,
 | |
|     fifteendirecttransaction int,
 | |
|     searchtype int,
 | |
|     rptext2 int,
 | |
|     threedirecttransaction int,
 | |
|     oneindirecttransaction int,
 | |
|     onedirecttransaction int,
 | |
|     favshoptotal int,
 | |
|     entityid int,
 | |
|     creativepv int,
 | |
|     threefavitemtotal int,
 | |
|     oneindirecttransactionshipping int,
 | |
|     directtransactionshipping int,
 | |
|     invalidclick int,
 | |
|     directtransaction int,
 | |
|     onefavshoptotal int,
 | |
|     rptext1 int,
 | |
|     click int,
 | |
|     traffictype int,
 | |
|     custid int,
 | |
|     entitytype int,
 | |
|     fifteenfavshoptotal int,
 | |
|     thedate datetime(6),
 | |
|     fifteenfavitemtotal int,
 | |
|     fifteenindirecttransactionshipping int,
 | |
|     fifteendirecttransactionshipping int,
 | |
|     favitemtotal int,
 | |
|     productid int,
 | |
|     cost int,
 | |
|     areaid int,
 | |
|     campaignid int,
 | |
|     feedid int,
 | |
|     sevenindirecttransactionshipping int,
 | |
|     memberid int,
 | |
|     adgroupid int,
 | |
|     PRIMARY KEY (memberid,thedate,productlineid,campaignid,adgroupid,creativeid,areaid,entityid,entitytype,traffictype,searchtype,productid,ext1,ext2)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_p4p_bidword_normtoorigin_000(
 | |
|     normalword varchar(300),
 | |
|     originalword varchar(300),
 | |
|     PRIMARY KEY (normalword)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_chenfeng_campaignid_lixian_accumulative_000(
 | |
|     click int,
 | |
|     clickprice int,
 | |
|     puttype int,
 | |
|     campaignid int,
 | |
|     impression int,
 | |
|     custid int,
 | |
|     thedate datetime(6),
 | |
|     sourcetype int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,puttype,sourcetype)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_chenfeng_custid_lixian_000(
 | |
|     custid int,
 | |
|     impression int,
 | |
|     sourcetype int,
 | |
|     puttype int,
 | |
|     thedate datetime(6),
 | |
|     click int,
 | |
|     clickprice int,
 | |
|     PRIMARY KEY (custid,thedate,puttype,sourcetype)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_chenfeng_campaignid_shishi_000(
 | |
|     thedate datetime(6),
 | |
|     sourcetype int,
 | |
|     custid int,
 | |
|     impression int,
 | |
|     campaignid int,
 | |
|     puttype int,
 | |
|     click int,
 | |
|     clickprice int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,puttype,sourcetype)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_chenfeng_campaignid_shishi_accumulative_000(
 | |
|     clickprice int,
 | |
|     click int,
 | |
|     puttype int,
 | |
|     campaignid int,
 | |
|     impression int,
 | |
|     custid int,
 | |
|     sourcetype int,
 | |
|     thedate datetime(6),
 | |
|     PRIMARY KEY (custid,thedate,campaignid,puttype,sourcetype)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_custom_ob_000(
 | |
|     oneindirecttransaction int,
 | |
|     threedirecttransaction int,
 | |
|     fifteendirecttransaction int,
 | |
|     threedirecttransactionshipping int,
 | |
|     directtransactionshipping int,
 | |
|     oneindirecttransactionshipping int,
 | |
|     threefavitemtotal int,
 | |
|     favshoptotal int,
 | |
|     onedirecttransaction int,
 | |
|     indirecttransaction int,
 | |
|     threeindirecttransaction int,
 | |
|     sevendirecttransactionshipping int,
 | |
|     sevendirecttransaction int,
 | |
|     sevenfavshoptotal int,
 | |
|     fifteenindirecttransaction int,
 | |
|     sevenindirecttransaction int,
 | |
|     onedirecttransactionshipping int,
 | |
|     indirecttransactionshipping int,
 | |
|     onefavitemtotal int,
 | |
|     sevenfavitemtotal int,
 | |
|     impression int,
 | |
|     threefavshoptotal int,
 | |
|     threeindirecttransactionshipping int,
 | |
|     ranksum int,
 | |
|     fifteendirecttransactionshipping int,
 | |
|     fifteenfavitemtotal int,
 | |
|     fifteenindirecttransactionshipping int,
 | |
|     thedate datetime(6),
 | |
|     fifteenfavshoptotal int,
 | |
|     memberid int,
 | |
|     sevenindirecttransactionshipping int,
 | |
|     cost int,
 | |
|     favitemtotal int,
 | |
|     onefavshoptotal int,
 | |
|     directtransaction int,
 | |
|     invalidclick int,
 | |
|     custid int,
 | |
|     click int,
 | |
|     PRIMARY KEY (custid,thedate)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_demographic_name_purchase_000(
 | |
|     demographicid int,
 | |
|     thedate datetime(6),
 | |
|     name varchar(100),
 | |
|     PRIMARY KEY (demographicid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_tag_000(
 | |
|     name varchar(300),
 | |
|     gmt_created datetime default now(),
 | |
|     id int,
 | |
|     type int,
 | |
|     gmt_modified datetime default now(),
 | |
|     PRIMARY KEY (id)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_adgroup_ob_000(
 | |
|     adgroupid int,
 | |
|     sevenindirecttransactionshipping int,
 | |
|     memberid int,
 | |
|     cost int,
 | |
|     campaignid int,
 | |
|     favitemtotal int,
 | |
|     fifteendirecttransactionshipping int,
 | |
|     fifteenindirecttransactionshipping int,
 | |
|     fifteenfavitemtotal int,
 | |
|     thedate datetime(6),
 | |
|     isshop int,
 | |
|     fifteenfavshoptotal int,
 | |
|     custid int,
 | |
|     click int,
 | |
|     onefavshoptotal int,
 | |
|     invalidclick int,
 | |
|     network int,
 | |
|     directtransaction int,
 | |
|     oneindirecttransactionshipping int,
 | |
|     directtransactionshipping int,
 | |
|     matchscope int,
 | |
|     threefavitemtotal int,
 | |
|     favshoptotal int,
 | |
|     onedirecttransaction int,
 | |
|     threedirecttransaction int,
 | |
|     oneindirecttransaction int,
 | |
|     searchtype int,
 | |
|     auctionid int,
 | |
|     fifteendirecttransaction int,
 | |
|     threedirecttransactionshipping int,
 | |
|     sevenfavitemtotal int,
 | |
|     creativeid int,
 | |
|     threefavshoptotal int,
 | |
|     impression int,
 | |
|     threeindirecttransactionshipping int,
 | |
|     ranksum int,
 | |
|     sevendirecttransactionshipping int,
 | |
|     threeindirecttransaction int,
 | |
|     indirecttransaction int,
 | |
|     fifteenindirecttransaction int,
 | |
|     sevenfavshoptotal int,
 | |
|     sevendirecttransaction int,
 | |
|     onefavitemtotal int,
 | |
|     indirecttransactionshipping int,
 | |
|     onedirecttransactionshipping int,
 | |
|     sevenindirecttransaction int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,adgroupid,creativeid,network,matchscope,searchtype)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_dim_000(
 | |
|     gmt_modified datetime default now(),
 | |
|     id int,
 | |
|     name varchar(300),
 | |
|     gmt_created datetime default now(),
 | |
|     PRIMARY KEY (id)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_adgroup_name_000(
 | |
|     title varchar(1024),
 | |
|     custid int,
 | |
|     adgroupid int,
 | |
|     memberid int,
 | |
|     campaignid int,
 | |
|     imgurl varchar(1024),
 | |
|     auctionid int,
 | |
|     thedate datetime(6),
 | |
|     isshop int,
 | |
|     linkurl varchar(1024),
 | |
|     PRIMARY KEY (custid,thedate,campaignid,adgroupid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_insight_bidword_price_000(
 | |
|     indirecttransaction int,
 | |
|     competition int,
 | |
|     mechanism int,
 | |
|     directtransaction int,
 | |
|     ext1 int,
 | |
|     indirecttransactionshipping int,
 | |
|     network int,
 | |
|     bidwordstr varchar(300),
 | |
|     impression int,
 | |
|     ext2 int,
 | |
|     click int,
 | |
|     pricedistribution int,
 | |
|     thedate datetime(6),
 | |
|     directtransactionshipping int,
 | |
|     bidwordhash int,
 | |
|     favshoptotal int,
 | |
|     cost int,
 | |
|     favitemtotal int,
 | |
|     PRIMARY KEY (bidwordhash,thedate,pricedistribution,network,mechanism,ext1,ext2,bidwordstr)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_sexpowerstar_ob_000(
 | |
|     directtransaction int,
 | |
|     invalidclick int,
 | |
|     onefavshoptotal int,
 | |
|     click int,
 | |
|     custid int,
 | |
|     fifteenfavshoptotal int,
 | |
|     fifteenfavitemtotal int,
 | |
|     thedate datetime(6),
 | |
|     fifteenindirecttransactionshipping int,
 | |
|     fifteendirecttransactionshipping int,
 | |
|     demographicstarid int,
 | |
|     demographicsexid int,
 | |
|     favitemtotal int,
 | |
|     campaignid int,
 | |
|     cost int,
 | |
|     memberid int,
 | |
|     sevenindirecttransactionshipping int,
 | |
|     sevenindirecttransaction int,
 | |
|     onefavitemtotal int,
 | |
|     indirecttransactionshipping int,
 | |
|     onedirecttransactionshipping int,
 | |
|     sevendirecttransaction int,
 | |
|     fifteenindirecttransaction int,
 | |
|     sevenfavshoptotal int,
 | |
|     indirecttransaction int,
 | |
|     threeindirecttransaction int,
 | |
|     sevendirecttransactionshipping int,
 | |
|     threeindirecttransactionshipping int,
 | |
|     impression int,
 | |
|     threefavshoptotal int,
 | |
|     sevenfavitemtotal int,
 | |
|     threedirecttransactionshipping int,
 | |
|     fifteendirecttransaction int,
 | |
|     demographicpurchaseid int,
 | |
|     threedirecttransaction int,
 | |
|     oneindirecttransaction int,
 | |
|     onedirecttransaction int,
 | |
|     favshoptotal int,
 | |
|     threefavitemtotal int,
 | |
|     directtransactionshipping int,
 | |
|     oneindirecttransactionshipping int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,demographicsexid,demographicpurchaseid,demographicstarid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_campaign_name_000(
 | |
|     memeberid int,
 | |
|     thedate datetime(6),
 | |
|     campaignid int,
 | |
|     campaigintitle varchar(1024),
 | |
|     custid int,
 | |
|     campaigntype int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_insight_bidword_000(
 | |
|     mechanism int,
 | |
|     competition int,
 | |
|     indirecttransaction int,
 | |
|     ext1 int,
 | |
|     indirecttransactionshipping int,
 | |
|     network int,
 | |
|     directtransaction int,
 | |
|     impression int,
 | |
|     bidwordstr varchar(512),
 | |
|     click int,
 | |
|     ext2 int,
 | |
|     thedate datetime(6),
 | |
|     bidwordhash int,
 | |
|     directtransactionshipping int,
 | |
|     favitemtotal int,
 | |
|     cost int,
 | |
|     favshoptotal int,
 | |
|     PRIMARY KEY (bidwordhash,thedate,network,mechanism,ext1,ext2,bidwordstr)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_insight_bidword_category_000(
 | |
|     click int,
 | |
|     ext2 int,
 | |
|     bidwordstr varchar(300),
 | |
|     impression int,
 | |
|     indirecttransactionshipping int,
 | |
|     ext1 int,
 | |
|     network int,
 | |
|     directtransaction int,
 | |
|     indirecttransaction int,
 | |
|     mechanism int,
 | |
|     competition int,
 | |
|     favshoptotal int,
 | |
|     cost int,
 | |
|     favitemtotal int,
 | |
|     directtransactionshipping int,
 | |
|     bidwordhash int,
 | |
|     thedate datetime(6),
 | |
|     category int,
 | |
|     PRIMARY KEY (category,bidwordhash,thedate,network,mechanism,ext1,ext2,bidwordstr)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_demographic_name_sex_000(
 | |
|     name varchar(100),
 | |
|     thedate datetime(6),
 | |
|     demographicid int,
 | |
|     PRIMARY KEY (demographicid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_pos_ob_000(
 | |
|     threedirecttransactionshipping int,
 | |
|     fifteendirecttransaction int,
 | |
|     auctionid int,
 | |
|     oneindirecttransaction int,
 | |
|     threedirecttransaction int,
 | |
|     dimid int,
 | |
|     onedirecttransaction int,
 | |
|     favshoptotal int,
 | |
|     threefavitemtotal int,
 | |
|     oneindirecttransactionshipping int,
 | |
|     directtransactionshipping int,
 | |
|     sevenindirecttransaction int,
 | |
|     onedirecttransactionshipping int,
 | |
|     indirecttransactionshipping int,
 | |
|     onefavitemtotal int,
 | |
|     sevendirecttransaction int,
 | |
|     fifteenindirecttransaction int,
 | |
|     sevenfavshoptotal int,
 | |
|     indirecttransaction int,
 | |
|     threeindirecttransaction int,
 | |
|     sevendirecttransactionshipping int,
 | |
|     threeindirecttransactionshipping int,
 | |
|     impression int,
 | |
|     threefavshoptotal int,
 | |
|     placeid int,
 | |
|     sevenfavitemtotal int,
 | |
|     fifteenfavshoptotal int,
 | |
|     isshop int,
 | |
|     fifteenindirecttransactionshipping int,
 | |
|     fifteenfavitemtotal int,
 | |
|     thedate datetime(6),
 | |
|     fifteendirecttransactionshipping int,
 | |
|     favitemtotal int,
 | |
|     cost int,
 | |
|     campaignid int,
 | |
|     memberid int,
 | |
|     sevenindirecttransactionshipping int,
 | |
|     adgroupid int,
 | |
|     directtransaction int,
 | |
|     invalidclick int,
 | |
|     onefavshoptotal int,
 | |
|     click int,
 | |
|     custid int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,adgroupid,placeid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_campaign_ob_000(
 | |
|     searchtype int,
 | |
|     oneindirecttransaction int,
 | |
|     threedirecttransaction int,
 | |
|     threedirecttransactionshipping int,
 | |
|     fifteendirecttransaction int,
 | |
|     threefavitemtotal int,
 | |
|     matchscope int,
 | |
|     directtransactionshipping int,
 | |
|     oneindirecttransactionshipping int,
 | |
|     onedirecttransaction int,
 | |
|     favshoptotal int,
 | |
|     sevenfavshoptotal int,
 | |
|     fifteenindirecttransaction int,
 | |
|     sevendirecttransaction int,
 | |
|     sevendirecttransactionshipping int,
 | |
|     threeindirecttransaction int,
 | |
|     indirecttransaction int,
 | |
|     onefavitemtotal int,
 | |
|     indirecttransactionshipping int,
 | |
|     onedirecttransactionshipping int,
 | |
|     sevenindirecttransaction int,
 | |
|     threefavshoptotal int,
 | |
|     impression int,
 | |
|     sevenfavitemtotal int,
 | |
|     ranksum int,
 | |
|     threeindirecttransactionshipping int,
 | |
|     fifteendirecttransactionshipping int,
 | |
|     fifteenfavshoptotal int,
 | |
|     isshop int,
 | |
|     fifteenfavitemtotal int,
 | |
|     fifteenindirecttransactionshipping int,
 | |
|     thedate datetime(6),
 | |
|     sevenindirecttransactionshipping int,
 | |
|     memberid int,
 | |
|     favitemtotal int,
 | |
|     campaignid int,
 | |
|     cost int,
 | |
|     invalidclick int,
 | |
|     network int,
 | |
|     directtransaction int,
 | |
|     onefavshoptotal int,
 | |
|     custid int,
 | |
|     click int,
 | |
|     PRIMARY KEY (custid,thedate,campaignid,network,matchscope,searchtype,isshop)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| CREATE TABLE IF NOT EXISTS rpt_bpp4p_area_name_000(
 | |
|     cityid int,
 | |
|     cityname varchar(100),
 | |
|     provinceid int,
 | |
|     provincename varchar(100),
 | |
|     PRIMARY KEY (provinceid,cityid)
 | |
| ) COMPRESSION='lz4_1.0' ;
 | |
| 
 | |
| drop database createsql;
 | 
