title: SQL how to group by year end
body: <p>I am not well advanced in SQL. Maybe someone could help me with this little problem.
  I need to summarize data  by year end. I know I can use</p>
  <pre><code>SELECT Year(Mydate) as year,
         Sum(Amount)  as amount
  FROM table1
  GROUP BY Year(Mydate)
  </code></pre>
  <p>Mydate here is full date column (i.e. 15/6/2020). However in this case I get year as year number. I need to get year as year end date, i.e. 12/31/2021. How can I do that?</p>