i have a table with a similar structure to this:
name surname flag
bob jones red
jill jones blue
fred smith yellow
jake johnson purple
terry wogan green
what i want to achieve is to pull the DISTINCT surnames and display the data held in 'flag' that relates to those distinct results.
eg - i want to print "jones - red" etc...
i have tried this - SELECT DISTINCT(surname), flag WHERE...
but this pulls everything and isnt distinct.
any ideas guys?