title: Please help to crack a sql query to fetch a record using self join or any other way
body: <p>I have a table Cust with two columns custid and flag.And there are records with flags u,i for same custid.
  I just want to fetch records which are having only flag as U but not I.
  Example:</p>
  
  <p>Cust Table:</p>
  
  <pre><code>custid  flag
  123      U
  123      I
  124      U
  124      I
  125      U
  126      U
  126      I
  127      U
  127      U
  </code></pre>
  
  <p>I want to pick custid 125 and and 127 as they dont have flag I.</p>
  
  <p>Please suggest a query.</p>