title: Finding the percentage (%) range of average value in SQL
body: <p>I am wanting to return the values that lie within 20% of the average value within the Duration column in my database.</p>
  
  <p>I want to build on the code below but instead of returning Where Duration is less than the average value of duration I want to return all values which lay within 20% of the AVG(Duration) value. </p>
  
  <pre><code>Select * From table
  Where Duration &lt; (Select AVG(Duration) from table)
  </code></pre>