Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select date_trunc('minute', source_send_time), source, dest,
- target_copy, count(id)
- from action.transit_copy
- where source_send_time > '2018-05-28'
- group by 1,2,3,4
- having count(id) > 1;
- select date_trunc('second', source_send_time), source, dest,
- target_copy, count(id)
- from action.transit_copy
- where source_send_time > '2018-05-28'
- group by 1,2,3,4
- having count(id) > 1;
- --I ran the next two to get some kind of idea what happened before the upgrade to 3.0 and the web staff client.
- select date_trunc('second', source_send_time), source, dest,
- target_copy, count(id)
- from action.transit_copy
- where source_send_time between '2018-01-01' and '2018-05-29'
- group by 1,2,3,4
- having count(id) > 1
- order by 1;
- select date_trunc('minute', source_send_time), source, dest,
- target_copy, count(id)
- from action.transit_copy
- where source_send_time between '2018-01-01' and '2018-05-29'
- group by 1,2,3,4
- having count(id) > 1
- order by 1;
- -- Hour granularity turns up even more.
- select date_trunc('hour', source_send_time), source, dest,
- target_copy, count(id)
- from action.transit_copy
- where source_send_time > '2018-05-28'
- group by 1,2,3,4
- having count(id) > 1
- order by 1;
- -- Experimenting with 1 day granularity and adding more fields.
- select date_trunc('day', source_send_time), source, dest,
- target_copy, count(id)
- from action.transit_copy
- where source_send_time > '2018-05-28'
- group by 1,2,3,4
- having count(id) > 1
- order by 1;
- select date_trunc('day', source_send_time), source, dest,
- target_copy, prev_hop, count(id)
- from action.transit_copy
- where source_send_time > '2018-05-28'
- group by 1,2,3,4,5
- having count(id) > 1
- order by 1;
- select date_trunc('day', source_send_time), source, dest,
- target_copy, prev_hop, prev_dest, copy_status, count(id)
- from action.transit_copy
- where source_send_time > '2018-05-28'
- group by 1,2,3,4,5,6,7
- having count(id) > 1
- order by 1;
- select date_trunc('day', source_send_time), source, dest,
- target_copy, prev_hop, prev_dest, count(id)
- from action.transit_copy
- where source_send_time > '2018-05-28'
- group by 1,2,3,4,5,6
- having count(id) > 1
- order by 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement