SHARE
TWEET

Selecting the distinct values from three columns with the max of a fourth where there are duplicates

a guest Feb 26th, 2012 17 Never
  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;
RAW Paste Data
Top