Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. select
  2. DATE_ADD(
  3. DATE_FORMAT(created_at, "%Y-%m-%d %H:00:00"),
  4. INTERVAL (floor(MINUTE(created_at) / 5) * 5) minute
  5. ) AS 5_min,
  6. count(*),
  7. round(sum(if(workflow = 5, 1, 0)) / count(*), 4) success_rate,
  8. round(sum(if(error_trace like 'Streams::Validation::TimeStreamRequiredError%', 1, 0)) / count(*), 4) no_time_rate,
  9. round(sum(if(error_trace like 'RuntimeError empty file, all points filtered out%', 1, 0)) / count(*), 4) empty_rate,
  10. round(sum(if(file_id like 'error-%', 1, 0)) / count(*), 4) reupload,
  11. max(id)
  12. from uploads
  13. where
  14. device_type = 101
  15. and
  16. (device_details like '%Strava 4.5%')
  17. and
  18. workflow in (5,7)
  19. and
  20. id > 394460445
  21. group by 5_min desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement