title: Is it possible to define custom aggregates in InfluxDB?
body: <p>I'm currently using (abusing?) Postgres to store time-series data, and given the amount of data now being consumed I'm needing to migrate over to a true time-series database that supports continuous queries and retention policies. I'm looking at InfluxDB, and the only thing holding me back is the ability to define custom aggregates. I currently have a custom aggregate defined in Postgres that calculates a weighted average for data in a table based, with weights being determined by the value in one of the columns. For example, I have a <code>score</code> column with values between 1 and 9. When calculating the weighted average score, I multiply the score by 10 if it's between 4 and 6, and multiply it by 1,000 if it's between 7 and 9 before calculating the average.</p>
  
  <p>Is it possible to do something similar in InfluxDB?</p>