title: Add a sequence number for each element in a group using an Oracle SQL query
body: <p>I have an Oracle table with the following data:</p>
  <pre><code>ID          VALUE
  10           A
  10           B
  10           C
  20           A1
  30           C1
  30           D1
  </code></pre>
  <p>I want to do a <em>group by</em> based on the ID column and print a new column with the sequence number within each group.</p>
  <p>The output would look like this:</p>
  <pre><code>ID          VALUE     GROUPSEQ
  10           A           1
  10           B           2
  10           C           3
  20           A1          1
  30           C1          1
  30           D1          2
  </code></pre>
  <p>Can this be done using an Oracle SQL query, without creating a temporary table?</p>