title: Query: better way to implement logic
body: <p>I need better logic for performance.</p>
  
  <p>I need to get sum of offshore and onsite time, from the same table and the same condition, except for offshore time, I will pick only if a column chargeable is 1</p>
  
  <pre><code>select sum(onsitetime)
      + (
          select sum (offshoretime) 
          from table a
          where a.col1 = 2 and a.col2 = 4
          and a.chargeable = 1
      )
  from table a
  where a.col1=2 and a.col2=4
  </code></pre>