title: Get count of records of the top 3 rows and compare the counts
body: <p>In SQL Server 2016, I have a query as such:</p>
  <pre><code>  SELECT [Report_date], count(distinct indv_id)
    FROM
    [dbo].[STG_TABLE] group by report_date order by report_date desc
  </code></pre>
  <p>I get the results as below:</p>
  <pre><code>Report_date (No column name)
  2020-08-21  47918
  2020-08-12  968065
  2020-07-31  977804
  </code></pre>
  <p>Now I want to compare the difference between the counts in each row. If the difference is more than 10%, then I need to send an email out in the SSIS package.</p>
  <p>How can I go through each row and calculate the difference? I want to look at the first row and compare it with the second row.</p>