2019年最受欢迎的博文统计


2019年已经过去, 今年一共发表了 115篇博文, 评论 141条.

获取这一年博文发表数的SQL:

SELECT 
  Count(1) 
FROM 
  `wp_posts` 
WHERE 
  date_format(`post_date_gmt`, "%Y") = '2019' and 
  `post_type` = 'post' and 
  `post_status` = 'publish'

其中每个季度的文章数为: 17, 27, 33 和 37. 春天比较少写文章.

获取这一年评论发表数的SQL:

SELECT 
  Count(1) 
FROM 
  `wp_comments` 
WHERE 
  date_format(`comment_date`, "%Y") = '2019' and 
  `comment_approved` = '1'

十大热门的博文

根据以下SQL来获得评论最多的10篇博文. 看来博客2019年不是很多人来评论.

SELECT 
  `id`, `post_title`, `comment_count`
FROM
   `wp_posts` 
WHERE 
  date_format(`post_date_gmt`, "%Y") = '2019' and 
  `post_type` = 'post' and 
  `post_status` = 'publish' 
ORDER BY
  `comment_count` DESC
LIMIT 10
  1. 离伦敦脸书最近的一次 – 记FACEBOOK伦敦终面经历 – 评论10
  2. Adsense 提高广告收入小技巧: 让GOOGLE替你自动为你试验优化并选择最佳配置 – 评论5
  3. 英国TESCO超市有偿回收瓶子 – 评论4
  4. 洗碗机绝对是人类最伟大的发明 – 评论4
  5. GE的沙拉俱乐部 – 评论4
  6. 兄弟俩在音乐会上钢琴合奏 Leap Frog (跳跃的青蛙) – 评论4
  7. 如何延长硬盘的寿命 – 一定记得要备份 – 评论4
  8. 35岁生日: 媳妇和孩子就是最好的礼物 – 评论4
  9. 找一个 IPAD 9.7能刷题的蓝牙键盘不容易 – 评论4
  10. 入 加能 70-200mm F2.8 大白三代中长焦镜头 – 评论4

SQL十大评分博文

通过和 GD Star 评分系统结合, 就可以统计出十大评分的文章.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 SELECT 
   `p`.`ID`, 
   `p`.`post_title` as `title`, 
   `visitor_votes` + `user_votes` as `total_votes`, 
   `visitor_votes`, 
   `user_votes`  
FROM  
  `wp_gdsr_data_article` as `da` 
INNER JOIN `wp_posts` as `p` ON `da`.`post_id` = `p`.`ID` 
WHERE
  `p`.`post_type` = 'post' and 
  `p`.`post_status` = 'publish' and  
  date_format(`p`.`post_date_gmt`, "%Y") = '2019'
HAVING
  `total_votes` > 0
ORDER BY
  `total_votes` DESC
LIMIT 10
 SELECT 
   `p`.`ID`, 
   `p`.`post_title` as `title`, 
   `visitor_votes` + `user_votes` as `total_votes`, 
   `visitor_votes`, 
   `user_votes`  
FROM  
  `wp_gdsr_data_article` as `da` 
INNER JOIN `wp_posts` as `p` ON `da`.`post_id` = `p`.`ID` 
WHERE
  `p`.`post_type` = 'post' and 
  `p`.`post_status` = 'publish' and  
  date_format(`p`.`post_date_gmt`, "%Y") = '2019'
HAVING
  `total_votes` > 0
ORDER BY
  `total_votes` DESC
LIMIT 10
  1. 离伦敦脸书最近的一次 – 记FACEBOOK伦敦终面经历 – 投票59(49+10)
  2. 拒了甲骨文(Oracle)的 Offer – 投票45(36+9)
  3. 参加 2018 Hacktoberfest 活动, 收到一件衣服和几个小玩意 – 投票21(11+10)
  4. 找一个 IPAD 9.7能刷题的蓝牙键盘不容易 – 投票21(11+10)
  5. 公司的 No-blame 文化 – 投票21(11+10)
  6. 媳妇生日快乐, 恭喜你又年轻一岁啦 – 投票20(10+10)
  7. 康沃尔圣.迈克尔斯山(St Michael’s Mount)游玩攻略 – 投票20(10+10)4
  8. 程序员能刷题的网站和资源(我的刷题经验之谈) – 投票20(10+10)
  9. 如果不知道投资啥就投资孩子吧 – 投票20(10+10)
  10. 孩子在英国钢琴考级(英国钢琴等级考试) – 投票19(9+10)

通过统计排名 大概知道我博客读者的口味, 这样久而久之就能趣味相投, 写出读者较喜欢的题材.

Wordpress博文统计

GD Star Rating
loading...
本文一共 488 个汉字, 你数一下对不对.
2019年最受欢迎的博文统计. (AMP 移动加速版本)
上一篇: 计算机要从娃娃抓起: 在剑桥Chesterton中学给孩子讲Microbit编程
下一篇: 我为什么不做 UP 主

扫描二维码,分享本文到微信朋友圈
ee4284cb400136df918929dc57f55a48 2019年最受欢迎的博文统计 博文统计 网站信息与统计

2 条评论

评论