forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
414 B
16 lines
414 B
|
|
select max(b.id) as id_eventos, max(a.id_bilhetes) as id_bilhetes |
|
from ast_bilhetes a, ast_eventos_dacs b |
|
where b.uid2 = a.uniqueid |
|
and a.calldate::date < (now()::date -5) |
|
|
|
|
|
select count(*) from ast_eventos_dacs where id <= 0; |
|
select count(*) from ast_bilhetes where id_bilhetes <= 0; |
|
|
|
-- delete from ast_bilhetes where id_bilhetes <= 4298634 |
|
-- delete from ast_eventos_dacs where id <= 5434440 |
|
|
|
|
|
|
|
|