title: How to select Collective data through SQL query?
body: <pre><code>SELECT COUNT(a.running_ID)
         ,a.operation_name
         ,a.return_Code
      FROM log_master_2may_q9 a
         ,log_detail_2may_q9 b
      WHERE a.execution_id = b.execution_id
          AND b.type = 'MSISDN'
          AND operation_name IN ( 'manageProfile', 'getPayment' )
      GROUP BY a.return_Code
         ,a.operation_name;
  </code></pre>
  
  <p>Here what happening is I am getting data from with Multiples Return Code like '101', '102', '902' which is for Failure and Return code '100' and 'S' for success.</p>
  
  <p>With every return_Code I am getting some count.</p>
  
  <p>Now what I want is a collective data found for Failures code and same for success code.</p>
  
  <p>I tried using Concat command for above query but getting error.</p>
  
  <p>Can anyone please help here ?</p>
  
  <p>Additional Info :</p>
  
  <p>Data is coming from multiple tables here.</p>
  
  <p>Output coming is like this:</p>
  
  <p>Count(A.running_ID) operation_name  record_code
  765                getPayment         102
  14                 ManageProfile      102
  10                 getPayment         902
  661                ManageProfile      S
  262                ManageProfile      100
  11737              getPayment         100
  20                 getPayment         101</p>