title: Eliminate duplicates and retrieve Max Value for each ID
body: <p>I have a table like this:</p>
  
  <pre><code>ID     Signal    Station    Owner
  111     -120      Home      M1
  111     -120      Home      M1
  111     -120      Home      M2
  111     -120      Car       M1
  111     -120      Car       M2
  111     -120      Work      M1
  111    -120       Dept      M3
  111     -130      Car       M1
  111     -135      Work      M2
  222     -98       Home      M2
  222     -95       Work      M1
  222     -103      Work      M2
  </code></pre>
  
  <p>I just need the Query to return the max signal for each ID:If Signal is equal display one in random.But the below query is returning duplicates if the Signal is the same for multiple Stations and owners. Please help me out on this.All the fields are in same table</p>
  
  <pre><code>ID    Signal    Station    Owner
  111    -120       Dept        M3       
  111    -120       Home        M1      
  111    -120       Work        M2      
  222    -95        Work        M1 
  </code></pre>
  
  <p>But i need with out duplicate entries</p>
  
  <pre><code>Here is the SQL:
  
  SELECT g.ID, g.MaxSignal, g.Station, g.OwnerID FROM (SELECT id, MAX(Signal) AS  
  MaxSignal FROM t GROUP BY id) AS g inner join t ON g.id = t.id AND g.MaxSignal = t.Signal;
  </code></pre>