Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT keyword,
- ams as ams,
- competition as competition,
- cpc as cpc,
- /* KW DIFF. ALGO */
- IF(ams IS NULL AND cpc IS NULL AND competition IS NULL,
- NULL,
- GREATEST(if(ams>999999,
- /* PONDERATE USING MOST VOLUME & CPC */
- (if(ams>200000000,99,LOG(200000000,ams)*99)*10+
- if(cpc>0,if(cpc>3000,100,LOG(3000,cpc*1000)*100),0))/11
- ,
- /* PONDERATE WITH COMBINATION OF CPC, CMP & VOLUME */
- (
- if(ams>0,
- if(ams>1000000,99,LOG(1000000,ams)*100)+
- if(ams>500000000,99,(LOG(500000000,ams)*100))*2,
- 0)+
- if(competition>0,competition*100,0)+
- if(cpc>0,if(cpc>3000,100,LOG(3000,cpc*1000)*100),0)*3
- )/7
- ),5)
- ) as "difficulty"
- FROM keywords WHERE keyword like "amore"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement