Have you seen this report?
It does a lot of what you want.
> SQL Query follows....kinda
> /* tax summary for month by taxid */
> set nocount on
> declare @begindate char(10), @enddate char(10)
> select @begindate = '1/1/2000'
> select @enddate = '1/31/2000'
> set nocount off
A side note:
Tax is tracked at the line item detail, rather than the invoice
detail (so some items are taxable and some are not).
This is just a rough guess and hasn't been double checked:
Select TaxID, beforetax=sum(amount*quantity), taxes=sum(tax)+sum(tax2),