mcn_data.sql 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. #投稿数及昨日增量
  2. CREATE TABLE `dm_con_mcn_archive_d` (
  3. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  4. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  5. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  6. `log_date` date NOT NULL COMMENT '日期',
  7. `up_all` int(11) NOT NULL DEFAULT '0' COMMENT '绑定up主数',
  8. `archive_all` bigint(20) NOT NULL DEFAULT '0' COMMENT '总投稿数',
  9. `archive_inc` bigint(20) NOT NULL DEFAULT '0' COMMENT '投稿数昨日增量',
  10. `play_all` bigint(20) NOT NULL DEFAULT '0' COMMENT '总播放数',
  11. `play_inc` bigint(20) NOT NULL DEFAULT '0' COMMENT '播放数昨日增量',
  12. `danmu_all` bigint(20) NOT NULL DEFAULT '0' COMMENT '总弹幕数',
  13. `danmu_inc` bigint(20) NOT NULL DEFAULT '0' COMMENT '弹幕数昨日增量',
  14. `reply_all` bigint(20) NOT NULL DEFAULT '0' COMMENT '总评论数',
  15. `reply_inc` bigint(20) NOT NULL DEFAULT '0' COMMENT '评论数昨日增量',
  16. `share_all` bigint(20) NOT NULL DEFAULT '0' COMMENT '总分享数',
  17. `share_inc` bigint(20) NOT NULL DEFAULT '0' COMMENT '分享数昨日增量',
  18. `coin_all` bigint(20) NOT NULL DEFAULT '0' COMMENT '总硬币数',
  19. `coin_inc` bigint(20) NOT NULL DEFAULT '0' COMMENT '硬币数昨日增量',
  20. `fav_all` bigint(20) NOT NULL DEFAULT '0' COMMENT '总收藏数',
  21. `fav_inc` bigint(20) NOT NULL DEFAULT '0' COMMENT '收藏数昨日增量',
  22. `like_all` bigint(20) NOT NULL DEFAULT '0' COMMENT '总点赞数',
  23. `like_inc` bigint(20) NOT NULL DEFAULT '0' COMMENT '点赞数昨日增量',
  24. `fans_all` bigint(20) NOT NULL DEFAULT '0' COMMENT '总粉丝数',
  25. `fans_inc` bigint(20) NOT NULL DEFAULT '0' COMMENT '昨日粉丝增量',
  26. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  27. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  28. PRIMARY KEY (`id`),
  29. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`)
  30. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='mcn稿件汇总指标';
  31. #播放/弹幕/评论/分享/硬币/收藏/点赞数每日增量
  32. CREATE TABLE `dm_con_mcn_index_inc_d` (
  33. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  34. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  35. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  36. `log_date` date NOT NULL COMMENT '日期',
  37. `value` bigint(20) NOT NULL DEFAULT '0' COMMENT '当日播放/弹幕/评论/分享/硬币/收藏/点赞数',
  38. `type` varchar(20) NOT NULL COMMENT '分区类型,play、danmu、reply、share、coin、fav、like',
  39. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  40. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  41. PRIMARY KEY (`id`),
  42. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`,`type`)
  43. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='播放/弹幕/评论/分享/硬币/收藏/点赞数每日增量';
  44. #mcn播放/弹幕/评论/分享/硬币/收藏/点赞来源分区
  45. CREATE TABLE `dm_con_mcn_index_source_d` (
  46. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  47. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  48. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  49. `log_date` date NOT NULL COMMENT '日期',
  50. `type_id` int(11) NOT NULL COMMENT '一级分区ID',
  51. `rank` int(11) NOT NULL COMMENT '排名',
  52. `value` bigint(20) NOT NULL DEFAULT '0' COMMENT '一级分区',
  53. `type` varchar(20) NOT NULL COMMENT '分区类型,play、danmu、reply、share、coin、fav、like',
  54. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  55. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  56. PRIMARY KEY (`id`),
  57. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`,`type_id`,`type`)
  58. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='mcn播放/弹幕/评论/分享/硬币/收藏/点赞来源分区';
  59. #mcn稿件播放来源占比
  60. CREATE TABLE `dm_con_mcn_play_source_d` (
  61. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  62. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  63. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  64. `log_date` date NOT NULL COMMENT '日期',
  65. `iphone` bigint(20) NOT NULL COMMENT 'iphone播放量',
  66. `andriod` bigint(20) NOT NULL COMMENT 'andriod播放量',
  67. `pc` bigint(20) NOT NULL COMMENT 'pc播放量',
  68. `h5` bigint(20) NOT NULL COMMENT 'h5播放量',
  69. `other` bigint(20) NOT NULL COMMENT 'other播放量',
  70. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  71. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  72. PRIMARY KEY (`id`),
  73. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`)
  74. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='mcn稿件播放来源占比';
  75. #游客/粉丝性别占比
  76. CREATE TABLE `dm_con_mcn_fans_sex_w` (
  77. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  78. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  79. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  80. `log_date` date NOT NULL COMMENT '日期',
  81. `male` bigint(20) NOT NULL COMMENT '男性人数',
  82. `female` bigint(20) NOT NULL COMMENT '女性人数',
  83. `type` varchar(20) NOT NULL COMMENT '粉丝类型,guest、fans',
  84. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  85. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  86. PRIMARY KEY (`id`),
  87. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`,`type`)
  88. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='游客/粉丝性别占比';
  89. #游客/粉丝年龄分布
  90. CREATE TABLE `dm_con_mcn_fans_age_w` (
  91. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  92. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  93. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  94. `log_date` date NOT NULL COMMENT '日期',
  95. `a` bigint(20) NOT NULL COMMENT '0-16岁人数',
  96. `b` bigint(20) NOT NULL COMMENT '16-25岁人数',
  97. `c` bigint(20) NOT NULL COMMENT '25-40岁人数',
  98. `d` bigint(20) NOT NULL COMMENT '40岁以上人数',
  99. `type` varchar(20) NOT NULL COMMENT '粉丝类型,guest、fans',
  100. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  101. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  102. PRIMARY KEY (`id`),
  103. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`,`type`)
  104. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='游客/粉丝年龄分布';
  105. #游客/粉丝观看途径
  106. CREATE TABLE `dm_con_mcn_fans_play_way_w` (
  107. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  108. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  109. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  110. `log_date` date NOT NULL COMMENT '日期',
  111. `app` bigint(20) NOT NULL COMMENT 'app观看人数',
  112. `pc` bigint(20) NOT NULL COMMENT 'pc观看人数',
  113. `outside` bigint(20) NOT NULL COMMENT '站外观看人数',
  114. `other` bigint(20) NOT NULL COMMENT '其他观看人数',
  115. `type` varchar(20) NOT NULL COMMENT '粉丝类型,guest、fans',
  116. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  117. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  118. PRIMARY KEY (`id`),
  119. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`,`type`)
  120. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='游客/粉丝观看途径';
  121. #游客/粉丝地区分布
  122. CREATE TABLE `dm_con_mcn_fans_area_w` (
  123. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  124. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  125. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  126. `log_date` date NOT NULL COMMENT '日期',
  127. `province` varchar(200) NOT NULL COMMENT '省份',
  128. `user` bigint(20) NOT NULL COMMENT '人数',
  129. `type` varchar(20) NOT NULL COMMENT '粉丝类型,guest、fans',
  130. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  131. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  132. PRIMARY KEY (`id`),
  133. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`,`province`,`type`)
  134. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='游客/粉丝地区分布';
  135. #游客/粉丝倾向分布
  136. CREATE TABLE `dm_con_mcn_fans_type_w` (
  137. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  138. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  139. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  140. `log_date` date NOT NULL COMMENT '日期',
  141. `type_id` int(11) NOT NULL COMMENT '二级分区ID',
  142. `user` bigint(20) NOT NULL COMMENT '人数',
  143. `type` varchar(20) NOT NULL COMMENT '粉丝类型,guest、fans',
  144. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  145. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  146. PRIMARY KEY (`id`),
  147. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`,`type_id`,`type`)
  148. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='游客/粉丝倾向分布';
  149. #游客/粉丝标签地图分布
  150. CREATE TABLE `dm_con_mcn_fans_tag_w` (
  151. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  152. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  153. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  154. `log_date` date NOT NULL COMMENT '日期',
  155. `tag_id` int(11) NOT NULL COMMENT '标签ID',
  156. `user` bigint(20) NOT NULL COMMENT '人数',
  157. `type` varchar(20) NOT NULL COMMENT '粉丝类型,guest、fans',
  158. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  159. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  160. PRIMARY KEY (`id`),
  161. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`,`tag_id`,`type`)
  162. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='游客/粉丝标签地图分布';
  163. #mcn粉丝数相关
  164. CREATE TABLE `dm_con_mcn_fans_d` (
  165. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  166. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  167. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  168. `log_date` date NOT NULL COMMENT '日期',
  169. `fans_all` bigint(20) NOT NULL COMMENT 'mcn总粉丝数',
  170. `fans_inc` bigint(20) NOT NULL COMMENT 'mcn粉丝数昨日增量',
  171. `act_fans` bigint(20) NOT NULL COMMENT 'mcn活跃粉丝数',
  172. `fans_dec_all` bigint(20) NOT NULL COMMENT 'mcn取关粉丝总数',
  173. `fans_dec` bigint(20) NOT NULL COMMENT 'mcn昨日取关粉丝数',
  174. `view_fans_rate` float(3,2) NOT NULL COMMENT '观看活跃度',
  175. `act_fans_rate` float(3,2) NOT NULL COMMENT '互动活跃度',
  176. `reply_fans_rate` float(3,2) NOT NULL COMMENT '评论活跃度',
  177. `danmu_fans_rate` float(3,2) NOT NULL COMMENT '弹幕活跃度',
  178. `coin_fans_rate` float(3,2) NOT NULL COMMENT '投币活跃度',
  179. `like_fans_rate` float(3,2) NOT NULL COMMENT '点赞活跃度',
  180. `fav_fans_rate` float(3,2) NOT NULL COMMENT '收藏活跃度',
  181. `share_fans_rate` float(3,2) NOT NULL COMMENT '分享活跃度',
  182. `live_gift_fans_rate` float(3,2) NOT NULL COMMENT '直播礼物活跃度',
  183. `live_danmu_fans_rate` float(3,2) NOT NULL COMMENT '直播弹幕活跃度',
  184. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  185. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  186. PRIMARY KEY (`id`),
  187. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`)
  188. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='mcn粉丝数相关';
  189. #mcn粉丝按天增量
  190. CREATE TABLE `dm_con_mcn_fans_inc_d` (
  191. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  192. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  193. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  194. `log_date` date NOT NULL COMMENT '日期',
  195. `fans_inc` bigint(20) NOT NULL COMMENT '当日新增粉丝数',
  196. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  197. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  198. PRIMARY KEY (`id`),
  199. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`)
  200. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='mcn粉丝按天增量';
  201. #mcn粉丝按天取关数
  202. CREATE TABLE `dm_con_mcn_fans_dec_d` (
  203. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  204. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  205. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  206. `log_date` date NOT NULL COMMENT '日期',
  207. `fans_dec` bigint(20) NOT NULL COMMENT '当日取关粉丝数',
  208. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  209. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  210. PRIMARY KEY (`id`),
  211. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`)
  212. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='mcn粉丝按天取关数';
  213. #mcn粉丝关注渠道
  214. CREATE TABLE `dm_con_mcn_fans_attention_way_d` (
  215. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  216. `sign_id` bigint(20) NOT NULL COMMENT 'mcn签约ID',
  217. `mcn_mid` bigint(20) NOT NULL COMMENT 'mcn的mid',
  218. `log_date` date NOT NULL COMMENT '日期',
  219. `homepage` bigint(20) NOT NULL COMMENT '主站个人空间关注用户数',
  220. `video` bigint(20) NOT NULL COMMENT '主站视频页关注用户数',
  221. `article` bigint(20) NOT NULL COMMENT '专栏关注用户数',
  222. `music` bigint(20) NOT NULL COMMENT '音频关注用户数',
  223. `other` bigint(20) NOT NULL COMMENT '其他关注用户数',
  224. `ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  225. `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  226. PRIMARY KEY (`id`),
  227. UNIQUE KEY `uni_idx` (`sign_id`,`log_date`)
  228. ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COMMENT='mcn粉丝关注渠道';