Is there a way to execute a sql query that uses the distinct clause on some columns but not others? For example, say I had a table with the following columns: id, name, color and size. Then I wanted to select all the distinct names in a certain color, but I also needed to retrieve the id & size. In other words I wanted to do some thing like this: select distinct(name), size, id. Unfortunately SQL doesn't support that syntax. I could loop through the recordset and do a bunch of separate SQL queries, but I'd like to do it all in one query for efficiency. Any help would be much appreciated.