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

a guest Feb 26th, 2012 18 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select max(n), a, b, c
  2. from mytable
  3. group by a, b, c
  5. select a, b, c, max(n)
  6. from table
  7. group by a, b, c;
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!