1. select max(n), a, b, c
  2. from mytable
  3. group by a, b, c
  4.  
  5. select a, b, c, max(n)
  6. from table
  7. group by a, b, c;