Guest User

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

a guest
Feb 26th, 2012
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.11 KB | None | 0 0
  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;
Add Comment
Please, Sign In to add comment