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.
26 lines
735 B
26 lines
735 B
2 years ago
|
select a.calldate, a.src, a.dst, a.uniqueid, a.userfield, a.duration, a.billsec, a.flag_fila, b.tplg_codigo, b.tplg_descricao, tplg_tipo
|
||
|
from pbx_bilhetes a, pbx_tipo_ligacao b
|
||
|
where b.tplg_codigo = a.tipo_chamada
|
||
|
and a.data_bilhete >= '2018-03-01'
|
||
|
and a.data_bilhete <= '2018-03-31'
|
||
|
and a.lastapp <> 'Transferred Call'
|
||
|
--and b.tplg_codigo = 25
|
||
|
-- and flag_fila = 'S'
|
||
|
|
||
|
|
||
|
--select * from pbx_bilhetes limit 1
|
||
|
|
||
|
|
||
|
|
||
|
/*
|
||
|
select * from pbx_tipo_ligacao;
|
||
|
|
||
|
select count(*)
|
||
|
from pbx_bilhetes a
|
||
|
where 1=1
|
||
|
and a.data_bilhete >= '2018-03-01'
|
||
|
and a.data_bilhete <= '2018-03-31'
|
||
|
and a.lastapp <> 'Transferred Call'
|
||
|
-- and a.flag_fila = 'S'
|
||
|
and exists(select '' from pbx_eventos_dacs where uid2 = a.uniqueid)
|
||
|
*/
|