title: (Count on today) minus (count on previous day) for 1 Month duration
body: <p>How to query the sum of today count that need to be subtracted with sum of previous day count, daily for duration of one month.</p>
  
  <pre><code>SELECT COUNT(DISTINCT member_profile.memberProfileNumber)
  FROM member_profile
  LEFT JOIN member_token
  ON member_profile.id = member_token.memberProfileId
  WHERE member_profile.memberProfileNumber LIKE 'MM%';
  </code></pre>
  
  <p>I have two tables and columns as below:</p>
  
  <p><strong>Table member_profile</strong></p>
  
  <pre><code>memberProfileNumber
  id
  </code></pre>
  
  <p><strong>Table member_token</strong></p>
  
  <pre><code>memberProfileId
  createdAt
  </code></pre>
  
  <p>Expected result: </p>
  
  <p><img src="https://i.stack.imgur.com/2WD9m.png" alt="Expected Result"></p>