Best way to store differing tax rates for countries in SQL (then how to use it in a basket situation)

119 Views Asked by At

I have raw data that I'm trying to sort; I have the tables (I think) decided on with a basket including a basket_id, customer_id, basket_date, total_price, tax and payment_type.

Tax is a set portion of the total price, so if the total price were 512.99 and the seller came from the UK (which would denote a tax percentage of 10%, different for each country and a total of 6 countries) then the tax would be 51.299. I need to store that tax figure, NOT the percentage, in this basket table by somehow referencing the tax percentage in another tax table so that SQL can automatically calculate the figure from the percentage*total_price. Is this possible?

I don't need anything unnecessary in examples, JUST what I need to do, no need to overcomplicate it!

0

There are 0 best solutions below