Aim –
to get the last three months sales figures, from the date the report has been run, and put the the figures in separate columns associated with months.then provide a flag to give me indiciation if the sales amount has decreased by 10% within those 3months
The table which i am using is
SELECT TOP 1000 [hst_merchnum]
,[hst_date_processed]
,[hst_sales_amt]
FROM [FDMS].[dbo].[Fact_Financial_History]
[hst_merchnum] =
[hst_date_processed] =date of transactions, date is listed as 20120101 (y,m,d)
hst_sales_amt] = sales amount
I would need columns created so i can show last 3months hst_sales_amt from point of report
For eg – ran report in march
layout
hst_Merchantnum, Jan , Feb, march,
001 £1000 , £2000, £5000
eg 2) – ran report in august
hst_Merchantnum, June, july, August,
002 £1000 , £2000, £5000
Bookmarks