Advertisement
Guest User

Untitled

a guest
Apr 10th, 2020
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.00 KB | None | 0 0
  1.  
  2.     SELECT keyword,
  3.         ams as ams,
  4.         competition as competition,
  5.         cpc as cpc,
  6.         /* KW DIFF. ALGO */
  7.         IF(ams IS NULL AND cpc IS NULL AND competition IS NULL,
  8.             NULL,
  9.             GREATEST(if(ams>999999,
  10.                 /* PONDERATE USING MOST VOLUME & CPC */
  11.                 (if(ams>200000000,99,LOG(200000000,ams)*99)*10+
  12.                 if(cpc is null or cpc =0,0,if(cpc>3000,100,LOG(3000,cpc*1000)*100)))/11
  13.                ,
  14.                 /* PONDERATE WITH COMBINATION OF CPC, CMP & VOLUME */
  15.                 (
  16.                     if(ams>0,
  17.                         if(ams>1000000,99,LOG(1000000,ams)*100)+
  18.                         if(ams>500000000,99,(LOG(500000000,ams)*100))*2,
  19.                        0)+
  20.                     if(competition>0,competition*100,0)+
  21.                     if(cpc>0,if(cpc>3000,100,LOG(3000,cpc*1000)*100),0)*3
  22.                 )/7
  23.             ),5)
  24.         ) as "difficulty"
  25.     FROM keywords WHERE keyword like "amore"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement