CREATE TABLE synrpt_tt_promotion
(
advertiser_id
bigint(20) NOT NULL COMMENT ‘广告账户id’,
project_id
bigint(20) NOT NULL COMMENT ‘项目ID’,
promotion_id
bigint(32) NOT NULL COMMENT ‘广告ID’,
date
char(10) NOT NULL COMMENT ‘日期’,
hour
int(2) NOT NULL COMMENT ‘小时’,
promotion_name
varchar(255) DEFAULT NULL COMMENT ‘广告计划名称’,
stat_cost
varchar(10) DEFAULT NULL COMMENT ‘表示广告在投放期内的预估花费金额。当天数据可能会有波动,次日稳定’,
show_cnt
varchar(10) DEFAULT NULL COMMENT ‘广告展示给用户的次数。计算方式:经平台判定有效且被计费的展示次数。’,
cpm_platform
varchar(10) DEFAULT NULL COMMENT ‘广告平均每一千次展现所付出的费用,计算公式是:总消耗/展示数1000。',
click_cnt
varchar(10) DEFAULT NULL COMMENT ‘当用户点击广告素材时,触发点击事件,该事件被认为是一次有效的广告点击。’,
ctr
varchar(10) DEFAULT NULL COMMENT '广告被点击的次数占展示次数的百分比。计算方法:点击数/展示数100%’,
…
create_time
datetime DEFAULT CURRENT_TIMESTAMP,
sync_time
datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (advertiser_id
,project_id
,promotion_id
,date
,hour
) /*T![clustered_index] NONCLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin /*T! SHARD_ROW_ID_BITS=4 PRE_SPLIT_REGIONS=2 */ COMMENT=‘体验版广告分时报表数据’
PARTITION BY RANGE COLUMNS(date
)
(
…
PARTITION p20240415
VALUES LESS THAN (“2024-04-16”),
PARTITION p20240416
VALUES LESS THAN (“2024-04-17”),
PARTITION p20240417
VALUES LESS THAN (“2024-04-18”),
PARTITION p20240418
VALUES LESS THAN (“2024-04-19”),
PARTITION p20240419
VALUES LESS THAN (“2024-04-20”),
PARTITION p20240420
VALUES LESS THAN (“2024-04-21”),
PARTITION p20240421
VALUES LESS THAN (“2024-04-22”),
PARTITION p20240422
VALUES LESS THAN (“2024-04-23”),
PARTITION p20240423
VALUES LESS THAN (“2024-04-24”),
PARTITION p20240424
VALUES LESS THAN (“2024-04-25”),
PARTITION p20240425
VALUES LESS THAN (“2024-04-26”),
PARTITION p20240426
VALUES LESS THAN (“2024-04-27”),
PARTITION p20240427
VALUES LESS THAN (“2024-04-28”),
PARTITION p20240428
VALUES LESS THAN (‘2024-04-29’),
PARTITION p20240429
VALUES LESS THAN (‘2024-04-30’),
PARTITION p20240430
VALUES LESS THAN (‘2024-05-01’),
PARTITION p20240501
VALUES LESS THAN (‘2024-05-02’),
PARTITION p20240502
VALUES LESS THAN (‘2024-05-03’),
PARTITION p20240503
VALUES LESS THAN (‘2024-05-04’),
PARTITION p20240504
VALUES LESS THAN (‘2024-05-05’),
PARTITION p20240505
VALUES LESS THAN (‘2024-05-06’),
PARTITION p20240506
VALUES LESS THAN (‘2024-05-07’),
PARTITION p20240507
VALUES LESS THAN (‘2024-05-08’),
PARTITION p20240508
VALUES LESS THAN (‘2024-05-09’),
PARTITION p20240509
VALUES LESS THAN (‘2024-05-10’),
PARTITION p20240510
VALUES LESS THAN (‘2024-05-11’),
PARTITION p20240511
VALUES LESS THAN (‘2024-05-12’),
PARTITION p20240512
VALUES LESS THAN (‘2024-05-13’),
PARTITION p20240513
VALUES LESS THAN (‘2024-05-14’),
PARTITION p20240514
VALUES LESS THAN (‘2024-05-15’),
PARTITION p20240515
VALUES LESS THAN (‘2024-05-16’),
PARTITION p20240516
VALUES LESS THAN (‘2024-05-17’),
PARTITION p20240517
VALUES LESS THAN (‘2024-05-18’),
PARTITION p20240518
VALUES LESS THAN (‘2024-05-19’),
PARTITION p20240519
VALUES LESS THAN (‘2024-05-20’),
PARTITION p20240520
VALUES LESS THAN (‘2024-05-21’),
PARTITION p20240521
VALUES LESS THAN (‘2024-05-22’))