title: SQL query for calculating mtd, ytd values
body: <p>I have a table with columns <code>ID</code>, <code>Title</code>, <code>Date</code>, <code>Amount</code>.</p>
  
  <p>I need to get MTD, YTD amount values against each transaction based on <code>Title</code>, <code>Date</code>.</p>
  
  <p>Is there anyone who had done this before?</p>