title: SQL query to collect rows above and below a certain match in Postgres
body: <p>I have a postgres table A where I am looking to query n rows above and below a certain chosen value in a column.
  I have already implemented two basic queries as shown below</p>
  <pre><code>    SELECT * FROM A 
      WHERE a &gt;= 100 
      AND a &lt;= 100+n 
  </code></pre>
  <p>and</p>
  <pre><code>   SELECT * FROM A 
     WHERE a &lt;= 100
     AND a &gt;= 100-n  
  </code></pre>
  <p>Is there a way to merge these two queries into 1 instead of having to define two separate queries?</p>