title: Compare the triplet rows together and select max of them?
body: <p>Consider the following time series data</p>
  <pre><code>10-5-8-20-30-15-20-2-14-6-50-20-30-60-25-15-0-4-2-8-10-15-12-40-20
  </code></pre>
  <p>These are the values of <strong>y</strong>, and the <strong>x</strong> column starts from 1 respectively.</p>
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE &quot;Z_AXIS&quot; (X NUMBER, Y NUMBER)
  </code></pre>
  <p>I have come to the conclusion that if the data in the y-column are <em>compared three by three</em>, the maximum value in each triad, is the peak point.</p>
  <p>Does anyone have an idea how to specify peak points without using cursor, loop, lead and lag?</p>