title: Optimize Nested Select query
body: <p>How to optimize the following query to be work better : </p>
  
  <pre><code>SELECT  c.a1,c.a2,          
              (SELECT SUM(t2.TempOB)  FROM tbl1 t2 WHERE    t2.AccNo LIKE CONCAT( C.AccNo,'%') )OB, 
              (SELECT SUM(t3.TempDebit) FROM tbl1 t3 WHERE  t3.AccNo LIKE CONCAT( C.AccNo,'%') ) Debit,
              (SELECT SUM(t4.TempCredit) FROM tbl1 t4 WHERE t4.AccNo  LIKE CONCAT( C.AccNo,'%') ) Credit
              FROM tbl1 C  WHERE AccLevel= @Level  
  </code></pre>