Tax Report by Year and Month Yearly Totals SELECT from_unixtime(A.date_orig,"%Y") as yearmonth, count(A.id) as sales, sum(A.amount) as amount from %%AGILE_DB_PREFIX%%invoice_item_tax A A.site_id = %%DEFAULT_SITE%% GROUP BY yearmonth ORDER BY yearmonth DESC 0 Year: yearmonth true true Taxable Items sales true Tax Charged amount true dol,2 Monthly Totals SELECT from_unixtime(A.date_orig,"%M, %Y") as yearmonth, count(A.id) as sales, sum(A.amount) as amount from %%AGILE_DB_PREFIX%%invoice_item_tax A A.site_id = %%DEFAULT_SITE%% GROUP BY yearmonth ORDER BY yearmonth DESC 0 Month and Year: yearmonth true true Taxable Items sales true Tax Charged amount true dol,2 heading SELECT from_unixtime(A.date_orig,"%Y") as yearmonth from %%AGILE_DB_PREFIX%%invoice_item_tax A A.site_id = %%DEFAULT_SITE%% GROUP BY yearmonth ORDER BY yearmonth DESC 0 Breakdown for Year: yearmonth true true true false false SELECT B.description as tax, from_unixtime(A.date_orig,"%Y") as yearmonth, count(A.id) as sales, sum(A.amount) as amount from %%AGILE_DB_PREFIX%%invoice_item_tax A inner join %%AGILE_DB_PREFIX%%tax B on A.tax_id = B.id A.site_id = %%DEFAULT_SITE%% GROUP BY tax ORDER BY tax DESC 30 Tax tax true true Taxable Items sales true Tax Charged amount true dol,2 heading SELECT from_unixtime(A.date_orig,"%M, %Y") as yearmonth from %%AGILE_DB_PREFIX%%invoice_item_tax A A.site_id = %%DEFAULT_SITE%% GROUP BY yearmonth ORDER BY yearmonth DESC 0 Breakdown for Month: yearmonth true true true false false SELECT B.description as tax, from_unixtime(A.date_orig,"%M, %Y") as yearmonth, count(A.id) as sales, sum(A.amount) as amount from %%AGILE_DB_PREFIX%%invoice_item_tax A inner join %%AGILE_DB_PREFIX%%tax B on A.tax_id = B.id A.site_id = %%DEFAULT_SITE%% GROUP BY tax ORDER BY tax DESC 30 Tax tax true true Taxable Items sales true Tax Charged amount true dol,2