title: ORDER BY distance to another value
body: <p>Lets say we have a table like that</p>
  
  <pre><code>id|value
  --------
  1 | 50
  2 | 19
  3 | 100
  4 | 21
  5 | -10
  </code></pre>
  
  <p>How can I use <code>ORDER BY</code> operator to order values by their distance to another value? </p>
  
  <pre><code>SELECT * FROM table ORDER BY nearest(value,30) DESC
  </code></pre>
  
  <p>To get this table:</p>
  
  <pre><code>id|value
  --------
  4 | 21
  1 | 50
  2 | 19
  5 | -10
  3 | 100
  </code></pre>