入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

sql 出现次数最多排序

创建时间:2015-03-12 投稿人: 浏览次数:982
SELECT DISTINCT count(*) AS count,ip,keywords,pagefrom,pageurl FROM table
WHERE (
pagefrom like "%baidu.com%"
AND keywords !="" 
AND pageurl like "%/2011%"
AND pageurl not LIKE "%ozc=2%"  
and pageurl not LIKE "%bdlx%"  
and pageurl not LIKE "%bwlx%"  
and pageurl not LIKE "%wdlx%"  
and pageurl not LIKE "%360lx%"  
and pageurl not LIKE "%solx%"  
and pageurl not LIKE "%swlx%"  
and pageurl not LIKE "%smlx%"  
and pagefrom not LIKE "%ozc=2%"  
and pagefrom not LIKE "%bdlx%" 
and pagefrom not LIKE "%bwlx%"  
and pagefrom not LIKE "%wdlx%"  
and pagefrom not LIKE "%360lx%"  
and pagefrom not LIKE "%solx%"  
and pagefrom not LIKE "%swlx%"  
and pagefrom not LIKE "%smlx%")
GROUP BY keywords
ORDER BY  count DESC;

声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。