title: Trying to count distinct users in mysql using partition by
body: <p>I am trying to get a count of distinct users in a database by day. My data is in a local mysql database and this partition by code isn't giving me the count I need.</p>
  
  <pre><code>select date(created) as created_at,
  count(distinct user_id) over (PARTITION by date(created)) as ytd_count 
  from testdb.request_log;
  </code></pre>
  
  <p>SQL Workbench is giving me a syntax error at (P. </p>
  
  <p>Please help?</p>