title: SQL: Select average value of column for last hour and last day
body: <p>I have a table like below image. What I need is to get <code>average</code> value of <code>Volume</code> column, grouped by <code>User</code> <b>both for 1 hour and 24 hours ago</b>. How can I use <code>avg</code> with two different date range in <b>single query</b>?<br>
  <a href="https://i.stack.imgur.com/av8xF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/av8xF.png" alt="enter image description here"></a></p>