title: How to rewrite this procedure by using joins?
body: <pre><code>CREATE OR REPLACE PROCEDURE sample
  IS
  l_sum_1   NUMBER;
  l_sum_2   NUMBER;
  l_res  NUMBER;
  BEGIN
  SELECT   SUM (c1)
        + SUM (c2)
        + SUM (c3)
        + SUM (c4)
        + SUM (c5)
        + SUM (c6)
        + SUM (c7)
        + SUM (c8)
        + SUM (c9)
        + SUM (c10)
   INTO l_sum_1
   FROM tt1;
  
  SELECT SUM (p1) INTO l_sum_2 FROM tt2;
  l_res := l_sum_1 - l_sum_2;
  END;
  </code></pre>