today:
413
yesterday:
400
Total:
1,744,763

Technology

TEST 1

admin 2020.10.16 22:53 Views : 84

select DTID from DEDUCTION_TYPE

WHERE ACTIVE = 'A'

ORDER BY DTID

 

WHERE TO_NUMBER(TO_CHAR(CONTRIBUTION_DATE, 'YYYY')) = 2020

AND UPPER(MISSIONARY_ID) = 'A02'

GROUP BY DEDUCTION 

 

Select TOTAL,DEDUCTION , d.DTYPE, d.DTPERCENT from (select SUM(AMOUNT) as "TOTAL",DEDUCTION from contribution c

WHERE TO_NUMBER(TO_CHAR(CONTRIBUTION_DATE, 'YYYY')) = 2020 AND TO_NUMBER(TO_CHAR(CONTRIBUTION_DATE, 'MM')) = 2

-- AND UPPER(MISSIONARY_ID) = 'A02'

GROUP BY DEDUCTION ) 

INNER JOIN DEDUCTION_TYPE d

ON d.DTID = DEDUCTION

ORDER BY DEDUCTION