I am currently building a tool to analyze the price movements of the top 100 crypto tokens (by market cap). For now, we can assume that I have this list of 100 tokens hardcoded, and I have historical daily price data for each of these 100 tokens for the past 2 years. All of this data currently exists in a single hypertable. For clarity, the number of records in this table are 100 tokens * 2 years * 365 Days. (The price interval is daily). For deployment purposes, I will run a CRON job and update each token with that day’s price once per day.
I want to create a set of continuous aggregates that calculate the 30-day moving average for each respective token, but I am not sure what the best way to do this is. Does anyone have any advice, or materials I can look at to best do this?