Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. select distinct k.name as keyword,'google_us' as Search_Engine,
  2. subdate((STR_TO_DATE(CONCAT(gksr.week_indexed, ' Sunday'), '%X%V %W')), INTERVAL 7 DAY) AS RightDate,
  3. gksr.rank as Rank
  4. , gksr.url as Url
  5. from keywords k
  6. join google_keyword_serp_results gksr on k.id = gksr.keyword_id
  7. and domain_id = (select domain_id from domains_accounts
  8. where account_id = [ACCOUNTID]) and domain_rank=1 and serp_type=1
  9. join account_keyword_searchengines aks on aks.keyword_id = k.id
  10. and aks.account_id = [ACCOUNTID]
  11. #where fkrs.week_indexed < 201532;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement