I have a stocks table for example: I want to calculate moving average for all the stocks with a single query in Vertica. This is the way to do so for only one stock (according to Vertica website): Output: If I try to select all the stock: I am getting a wrong result. How can I fix that? Answer Add
Tag: moving-average
Calculating a 7 day average
I have this query. I want to generate the 7 day average of the mappings column. For example, I want to calculate the average mappings for each day (from 2020-01-03 – 2020-01-10). Results: Then return avg(avg_mapping) Answer I don’t see how your question relates to a rolling average. From your data and results, it seems like you just want aggregation
Add column moving average in mysql
I am currently adding crypto market data to my mysql database. I have the following data per minute : I would like to add the simple moving average of different time periods to the mysql database. I tried to do this calculation in python but this took to much time. Therefore, I calculated the SMA of a 50 day time