摘要:
--适当借鉴高手经验,原帖忘记那里了,很抱歉当你需要查询同时满足一个字段(两个不同条件)的数据时,而且数据量又比较大,推荐使用以下方法,可以适当提高效率 示例如下: SELECT d.channel_id,COUNT(case when d.editor_id<0 then 0 end ) AS autocount,COUNT(0) AS sumcount FROM ad_data AS d WHERE d.create_time BETWEEN '2013-07-16 00:00:00' AND '2013-08-16 23:5... 阅读全文