Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. SELECT value_pause_duration, c_sum, total_views FROM(
  2. SELECT value_pause_duration, weight_view_count, SUM(weight_view_count) OVER (ORDER BY value_pause_duration) AS c_sum, SUM(weight_view_count) OVER () as total_views
  3. FROM zareen.testing
  4. ORDER BY value_pause_duration
  5. LIMIT 10) as inner
  6. WHERE c_sum >= int(total_views/2)
  7. LIMIT 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement