title: Check for x consecutive days - given timestamps in database
body: <p>Could anybody give me an idea or hint how you could check for X consecutive days in a database table (MySQL) where logins (user id, timestamp) are stored?</p>
  
  <p>Stackoverflow does it (e.g. badges like Enthusiast - if you log in for 30 consecutive days or so...). What functions would you have to use or what is the idea of how to do it?</p>
  
  <p>Something like <code>SELECT 1 FROM login_dates WHERE ...</code>?</p>