title: how to get the count of total rows and sum of a particular column
body: <p>This is my original query</p>
  
  <pre><code>SELECT acct_id,
         acct_client_short_name,
         acct_cat_code,
         cusip_num,
         symbol_code,
         product_name,
         sec_type_code,
         acct_type_code,
         ann_int_rate_and_maturity_dt_text,
         sd_id,
         loc_code,
         settled_flag,
         td_id,
         eff_dt,
         clearing_code,
         SUM(traded_shrs_num),
         SUM(curr_shrs_num) AS c1
  FROM (SELECT 'ID900910' AS acct_id,
               'CNS Netting' AS acct_client_short_name,
               'CNS' AS acct_cat_code,
               cusip_num,
               symbol_code,
               product_name,
               sec_type_code,
               acct_type_code,
               ann_int_rate_and_maturity_dt_text,
               sd_id,
               loc_code,
               settled_flag,
               td_id,
               eff_dt,
               clearing_code,
               traded_shrs_num,
               curr_shrs_num
        FROM [csr_staging].[dbo].[fi_impact_source]
        WHERE (clearing_code = 'MBS'
            OR clearing_code = 'CNS')
          AND (SD_ID &gt;= EFF_DT)) a
  GROUP BY acct_id,
           acct_client_short_name,
           acct_cat_code,
           cusip_num,
           symbol_code,
           product_name,
           sec_type_code,
           acct_type_code,
           ann_int_rate_and_maturity_dt_text,
           sd_id,
           loc_code,
           settled_flag,
           td_id,
           eff_dt,
           clearing_code;
  </code></pre>
  
  <p>total rows = 383 rows</p>
  
  <p>how do we get the count of total rows from the above query?</p>
  
  <p>i.e <code>select count(*),sum(c1) from query1</code>?</p>