title: GROUP BY using substring?
body: <p>I have the following table:</p>
  
  <pre><code>t1:
  id                item
  --------------------------
  XR-2017-432       car
  XR-2019-736       car
  BC-2017-847       motorbike
  XR-2017-937       car
  BC-2020-758       motorbike
  GK-2019-823       boat
  GK-2017-928       boat
  XR-2018-438       car
  </code></pre>
  
  <p>And I want to count the number of occurences of each year. 
  The answer of the query should be this: </p>
  
  <pre><code>result:
  year        count
  -------------------
  2017        4
  2018        1
  2019        2
  2020        1
  </code></pre>
  
  <p>How can I do this with a MySQL query?</p>