title: How to select the maximum quarter from the result set?
body: <p>I have a list of period for each quarter for many years, I need to select the maximum period from the result.</p>
  
  <p>Say for example, the actual data would be like this;</p>
  
  <pre><code>**period description**
  2014 Q2
  2014 Q1
  2018 Q3
  2016 Q1
  2017 Q4
  2018 Q4
  </code></pre>
  
  <p>Here I need to fetch only the latest quarter in the given data..i.e. we need to get 2018 Q4.</p>
  
  <p>I tried :</p>
  
  <pre><code>select substring  (perioddescription, 1, 4)
  </code></pre>
  
  <p>but I've a string in between them so any help would be much appreciated.thanks in advacne</p>