I am stuck with a task & not getting there.
I want to calculate income tax based on a slab based taxation system. The thing is for a specific amount say $45000 for example, the tax would be $6895.00 as per below :
Income Amount Income Tax
Income up to $14000, taxed at 10.5% : $14,000.00 = $1470.00
Income over $14000 and up to $48000, taxed at 17.5% : $31,000.00 = $5425.00
Income over $48000 and up to $70000, taxed at 30% ($0.00 in this case)
Remaining income over $70000, taxed at 33% ($0.00 in this case)
Total tax for $45000 is $6895.00
Can someone please help me on how can I implement it in SQL query? Thanks a lot in advance.