--self--

select sum(cast(amount as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and description='LVB SELF Cr A/C' and cmpname='SRI ATHISAKTHI CAPITALS'

select sum(cast(amount as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and description='LVB SELF Dr A/C' and cmpname='SRI ATHISAKTHI CAPITALS'

--Credit--

select sum(cast(principle as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and principle is not null and principle!='' and credeb='Credit'

select sum(cast(interest as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and principle is not null and principle!='' and interest is not null and interest!='' and credeb='Credit'

select sum(cast(amount as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and (principle is null or principle='') and credeb='Credit' and description!='LVB SELF Cr A/C'

--Debit--

select sum(cast(principle as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and principle is not null and principle!='' and credeb='Debit'

select sum(cast(interest as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and principle is not null and principle!='' and interest is not null and interest!='' and credeb='Debit'

select sum(cast(amount as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and (principle is null or principle='') and credeb='Debit' and description!='LVB SELF Dr A/C'

--Credit not Cash--

select sum(cast(principle as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and principle is not null and principle!='' and credeb='Credit' and pmode!='Cash'

select sum(cast(interest as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and principle is not null and principle!='' and interest is not null and interest!='' and credeb='Credit' and pmode!='Cash'

select sum(cast(amount as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and (principle is null or principle='') and credeb='Credit' and description!='LVB SELF Cr A/C' and pmode!='Cash'

--Debit not Cash--

select sum(cast(principle as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and principle is not null and principle!='' and credeb='Debit' and pmode!='Cash'

select sum(cast(interest as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and principle is not null and principle!='' and interest is not null and interest!='' and credeb='Debit' and pmode!='Cash'

select sum(cast(amount as float)) from sac.dbook where date<'30-03-2019' and date>='21-04-2018' and cmpname='SRI ATHISAKTHI CAPITALS'
and (principle is null or principle='') and credeb='Debit' and description!='LVB SELF Dr A/C' and pmode!='Cash'