title: ORACLE SQL get difference of two values retrieved from 2 select statements
body: <p>We have 2 very simple SELECT statements:</p>
  
  <pre><code>SELECT value from table where date between DATE1 and DATE2
  SELECT value from table where date between DATE3 and DATE4
  </code></pre>
  
  <p>We need a way to write a single SQL statement which will get the difference of the "value" that is returned from these two SQL statements.</p>
  
  <p>We tried the following but it was not successful:</p>
  
  <pre><code>SELECT value from table where date between DATE1 and DATE2
  minus 
  SELECT value from table where date between DATE3 and DATE4
  </code></pre>
  
  <p>Any suggestion is highly appreciated. </p>