title: Redshift COUNT(DISTINCT()). Count Unique Dates for each ID
body: <p><br>
  I'm trying to do a distinct count of dates for each ID in my table. I tried this code but it's not returning the correct output. <br></p>
  
  <pre><code>SELECT *
  , DENSE_RANK() OVER(PARTITION BY "video_id" ORDER BY "date") AS "distinct_count_date"
  FROM mytable
  ;   
  </code></pre>