title: Unique Counts in Teradata per column
body: <p>I have a dataset that consists of the following</p>
  
  <pre><code>ID     SubID
  1        1
  1        2
  2        1
  3        1
  </code></pre>
  
  <p>I want a third column that basically flags the first ID and any subsequent IDs which are the same are ignored
  In essence someone (end user) wants to keep the details but also sum up the unique IDs in excel</p>
  
  <pre><code>ID     SubID  ident
  1        1      1
  1        2      0 
  2        1      1
  3        1      1 
  </code></pre>
  
  <p>I suspect i can use a <code>rank</code> function here but would appreciate any hints </p>