I have daily stock data stored in a table, and I want to be able to query something like "What is the data from the last 5 trading days". The problem is that I have no data for weekends or holidays, which throws off the day count.
From the other similar questions I see that some people have a holiday table where they store the holidays, but I'm hoping to avoid that, since I know that if there's no data, then that day was a weekend or holiday.
The only way I was thinking I could do this is to first run an initial query that enumerated each trading day sequentially, and then I can run a query that way, but I was hoping maybe there was a better way of doing it.