Advertisement
Guest User

Untitled

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