title: print data per day, week, month, year
body: <p>I have data in below format.</p>
  
  <pre><code>iPAddress   + timeVisited
  =========================
   varchar    +  timestamp
  </code></pre>
  
  <p>What I wanted to fetch is </p>
  
  <ol>
  <li>Report that have total IP per day (system date)</li>
  <li>Report that have total IP per week (if today is tue, I need this week and not last 7 days)</li>
  <li>Report that have total IP per month (current month... if today is 18 then from 1-18 of this month)</li>
  <li>Report that have total IP per year</li>
  </ol>
  
  <p>Any idea how to get this done?</p>