Distinct rows from non-distinct data?

  • Thread starter Thread starter eaymmus
  • Start date Start date
E

eaymmus

Guest
I have data which consists of:

xxxxx123 A.Nother 123456
xxxxx123 B.Jones 123457
xxxxx456 D.Smith 123458
xxxxx456 Z.Zephir 123489

How would I ensure that the query returned only unique rows (where column 1 is unique) based on the first alphabetical record of column 2?

Any ideas?
 
Use a group by clause in your query.
So you want unique records based on COL1 and COL2, what about COL3? You have to either use that as a unique value also, or pickup an agregate value based on the uniqueness of the other two columns.
 

Users who are viewing this thread

Back
Top Bottom