ITeye博客

mysql的count查询中使用条件

不念书的小子 · 2012-06-28 14:44 · MySql · 数据库 · mysql的count查询中使用条件 · Markdown

在mysql的count查询中加入条件,在mysql的count查询中加入条件,在mysql的count查询中加入条件,在mysql的count查询中加入条件,

 

 

 select count(pp_id),count(if(view_type='2',true,null )),count(if(bounce_type='1',true,null )),count(DISTINCT program_id),SUM(play_interval)   from v_calculate_play where app_id=app_id

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。