title: Flaggin active customers - Atleast one transaction every month
body: <p>Once the customer is registered, between date_registered and current date - if the customer has made atleast one transaction every month, then flag it as active or else flag it has inactive</p>
  
  <p>Note: Every customer has different date_registered</p>
  
  <p>I tried this but doesn't work since few of the customers were onboarded in the middle of the year
  Eg -</p>
  
  <pre><code>-------------------------------------
  txn_id | txn_date | name | amount
  -------------------------------------
  101     2018-05-01  ABC    100
  102     2018-05-02  ABC    200
  -------------------------------------
  </code></pre>
  
  <pre><code>       (case when count(distinct case when txn_date &gt;= '2018-05-01' and txn_date &lt; '2019-06-01' then last_day(txn_date) end) = 13
               then 'active' else 'inactive'
          end) as flag
  from t;
  </code></pre>
  
  <p>Final output</p>
  
  <pre><code>----------------
  name | flag
  ----------------
  ABC    active
  BCF    inactive
  </code></pre>