Bimsickle Posted March 16, 2016 Share Posted March 16, 2016 Haven't had much luck on this forum as of late, but I thought I'd give it a crack... Can you have an SQL Calculation that shows the same field twice? e.g. ExecuteSQL ( " SELECT State, Sum (Qty) FROM Sales WHERE SaleDate BETWEEN ? and ? and Product =? MINUS SaleDate BETWEEN ? and ? GROUP BY State ;"";¶;"1/1/2015"; "31/1/2015" ; "FSC"; "1/2/2015"; "28/2/2015") ) With an end result of VIC 20 3 NSW 38 18 etc... I am trying to work out growth using SQL with all of the sales for a 2 year period dumped in one table as a flat table per sales line... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.