Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- DATE_ADD(
- DATE_FORMAT(created_at, "%Y-%m-%d %H:00:00"),
- INTERVAL (floor(MINUTE(created_at) / 5) * 5) minute
- ) AS 5_min,
- count(*),
- round(sum(if(workflow = 5, 1, 0)) / count(*), 4) success_rate,
- round(sum(if(error_trace like 'Streams::Validation::TimeStreamRequiredError%', 1, 0)) / count(*), 4) no_time_rate,
- round(sum(if(error_trace like 'RuntimeError empty file, all points filtered out%', 1, 0)) / count(*), 4) empty_rate,
- round(sum(if(file_id like 'error-%', 1, 0)) / count(*), 4) reupload,
- max(id)
- from uploads
- where
- device_type = 101
- and
- (device_details like '%Strava 4.5%')
- and
- workflow in (5,7)
- and
- id > 394460445
- group by 5_min desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement