select 'da Inadimplencia' as Valor,
Round(sum(if(c.tipo_conta='Receber' and c.ativo = 'S' and ci.ativo = 'S' and ci.valor_pago <= 0,ci.valor,0))) as ' R$ '
 from conta_item ci
inner join conta c using(id_conta)
where ci.data < DATE_SUB(NOW(),INTERVAL 10 DAY)