Go Blue: The DISTINCT Operator asks when the DISTINCT operator is used. She also expresses some confusion over all of the different ways to do things in SQL.
Is there a general rule that whenever you use subqueries you don't need to use the distinct and everything will be automatically listed only once? I have a feeling it is more on a problem-by-problem basis...
You typically use DISTINCT when you are selecting on a non-unique attribute. One obvious case would be an attribute that is not the primary key. Also, when you write queries combining across tables you may wind up with a result set (the set of rows output as the answer) for which there is no unique identifier.
A lot of times you can design the query to produce unique output in the columns you want. So, DISTINCT is mainly a convenience operator.