Hello evail. Of course tax total won't be exactly %6 of the total sales. For example if you sell something for 11,75 exact tax amount should be 0,705 but we shold round it to make the ticket total payable. Tax amount becomes 0,71 and that makes tax rate %6,042. This is the reason of the difference.
I couldn't understand the thing you calculated from database. Work period reports calculated from db but there are lots of additonal calculations such as gifts, discounts, etc. I don't think getting a direct sum from db gives any idea about correctness of reports. We never encountered such problem but if you have any doubt best way will be storing physical bills for a while and comparing rerport values with your calculation based on printed numbers.