title: Calculate average session length per daily active user?
body: <p><a href="https://i.stack.imgur.com/065K4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/065K4.png" alt=""></a></p>
  
  <p>I'm pretty new to SQL and I'm struggling with one of the questions on my exercise. How would I calculate average session length per daily active user? The table shown is just a sample of what the extended table is. Imagine loads more rows.</p>
  
  <p>I simply used this query to calculate the daily active users:</p>
  
  <pre><code>SELECT COUNT (DISTINCT user_id) 
  FROM table1
  </code></pre>