Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. SELECT country_code, changeratio, ROUND(milliondailyviewsthisweek,1) AS milliondailyviewsthisweek FROM(SELECT country_code, ROUND(100*SUM(IF((day>7 AND day<15), view_count, null))/SUM(IF((day>0 AND day<8), view_count, null))-100,1) AS changeratio, SUM(IF((day>7 AND day<15), view_count, null))/7000000 AS milliondailyviewsthisweek FROM wmf.projectview_hourly WHERE year = 2016 AND month = 11 AND agent_type = "user" GROUP BY country_code) AS countrylist WHERE milliondailyviewsthisweek > 1 GROUP BY country_code, changeratio, milliondailyviewsthisweek ORDER BY ABS(changeratio) DESC LIMIT 10;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement