还是关于总结2006年的SQL

最近在看关于SQL的资料,这里再来几条SQL语句练习一下。

2006年度最多comment(&trackback&pingback)的posts

  1. SELECT ID, Count( comment_ID ) , post_title
  2. FROM `wp_comments` , `wp_posts`
  3. WHERE comment_post_ID = ID
  4. AND comment_approved = '1'
  5. AND post_date >= '2006-01-01'
  6. AND post_date < '2007-01-01'
  7. GROUP BY ID
  8. ORDER BY 2 DESC

1、更新blogbus to wordpress转换程序 (43 comments)
2、从blogbus跳转到WordPress (31 comments)
3、wordpress2.0 rss import文件分析及oblog导入 (18 comments)
4、我使用的plugins (17 comments)
5、怎样将wordpress从盘古搬到DreamHost (16 comments)

暂时还没想到更多的SQL,想好了再加吧。

1留言于“还是关于总结2006年的SQL”

  1. 2008说:

    [...] 2007年发布了的post总共为:39 留言最多的五个post: [...]

留言

提示/Tips:中国人使用中文!Your comment must include some Chinese in order to pass the comment checking.