mardi 15 mars 2016

select distinct two columns with random id

I would like to get distinct record of each Design and type with random id of each record It is not possible to use

select distinct Design, Type, ID from table

It will return all values This is structure of my table

Design | Type | ID
old chair 1
old table 2
old chair 3
new chair 4
new table 5
new table 6
newest chair 7

Possible result

Design | Type | ID
old table 2
old chair 3
new chair 4
new table 6
newest chair 7




Aucun commentaire:

Enregistrer un commentaire