tomhath and Lars are 100% correct.
Imagine a set like this:
Category, Sex, Name
"Carpenter", "F", "Sally";
"Carpenter", "M", "George";
"Truck Driver", "M", "Tim";
"Farmer", "M", "Bob";
"Farmer", "M", "Joe";
SELECT DISTINCT Category, Sex
"Carpenter", "F";
"Carpenter", "M";
"Truck Driver", "M";
"Farmer", "M";
So if you tried to make up a query like this:
SELECT DISTINCT( Category, Sex ), Name
You'd end up with something like this:
"Carpenter", "F", "Sally";
"Carpenter", "M", "George";
"Truck Driver", "M", "Tim";
"Farmer", "M", ??????????????
How does it know which name to pick? It can't. I will echo what the rest have said in that that type of requirement usually arises from improper database design or a lack of understanding of what you're trying to fetch.