Thank you for your interest, much apreciated. Yes you are right about temp tables, but i am a mere mortal compared to some here! 🙂
TradeHour represents hours of the day
MCLower & MCUpper represent a range of Market capitalisations in millions, the ranges do not overlap
Volume represents trading volume of shares
The ratios I am trying to calculate use EOD data (both historial and intraday hour snapshots) and the number of shares a company has to calculate a ratio so elevated trading volume can be determined by mulitplication
So i need a matrix of Tradehour, MC range and a ratio multiplier
In the morning i want to know if the current volume is unusual. I know by the end of the day(comparing one day to the next), but i want to work that out intraday. Thats why am gathering stats across the market to work out what is high/low trading, because activity isnt uniform throughout the day in each market segment (blue chip, microcpap etc)
Im limited to EOD data , I have already done this with Course of Sales data (with great help from this forum BTW)
I can do this easily in .net code, but not SQL