title: How do you add a query for data grouped by a regex in influxdb to grafana?
body: <p>So my main goal is to build a graph that charts how much data I've went through in a month in grafana (I'm on a comcast line).</p>
  
  <p>Month is not a time period however that influxdb's <code>GROUP BY time()</code> function supports. <a href="https://docs.influxdata.com/influxdb/v1.1/query_language/data_exploration/#group-by-time-intervals" rel="nofollow noreferrer">The documentation I looked at.</a> From here it looks like the longest time period is a week, likely because it doesn't change like a month does.</p>
  
  <p>However I noticed that all my time stamps use the same format (it would be weird if they didn't I guess). I know that influxdb supports regex FROM and WHERE statements, but does it support GROUP BY? If it did, I could use something like <code>"/-([^-]+)-/"</code> to query timestamps like <code>2016-12-18T08:25:50Z</code> and group by that? Or does influxdb support nested queries?</p>
  
  <p>edit: looks like I was looking at .9. I edited to 1.1 but didn't edit anything about my question.</p>
  
  <blockquote>
    <p><code>GROUP BY time()</code> queries group query results by a user-specified time interval</p>
  </blockquote>
  
  <p>I'm not really sure how that would work for a month considering that my length of time changes?</p>