title: Check if today's record already exist or not
body: <p>I have a table with multiple columns where I need to check if the column <strong>ANI</strong> (ANI is the mobile numbers) called for their first time or they have existing record on the previous dates, I need to return like 1 if exist and 0 if not</p>
  <p>I have tried a query but seems to be far away, any guidance will be much appreciated</p>
  <pre><code>SELECT DISTINCT(ANI) as mobile
  FROM ODCalls
  (CallLocalTime)  &gt;= '2022-06-08 00:00:00'
  and ANI NOT IN (
      select ANI
      from ODCalls
      WHERE (CallLocalTime)  &gt;= '2022-06-01 00:00:00'
      and (CallLocalTime)  &gt;= '2022-06-07 23:59:59'
  )
  </code></pre>