Script para ver o andamento
chart case when retries < 0 then 'Deleted' else 'Pending' end as pie
, count(1) as y
from cleanup_records
group by 1
order by 1;
chart case when retries < 0 then 'Deleted' else record_table end as pie
, count(1) as y
from cleanup_records
group by case when retries < 0 then 'Deleted' else record_table end
order by 2 desc;
select record_table, count(1)
from cleanup_records
where retries >= 0
group by record_table
order by 2 desc;