In SQL, the DISTINCT keyword eliminates redundant rows in the the output. By redundant, I mean that the query engine looks at each value in each column and returns only unique combinations of values. Perhaps an example would demonstrate this better.
SELECT DISTINCT noder_name FROM nodes;
The output from the query above would be a list of all unique values for the column noder_name. If noder_name "novasoy" had 180 records in the nodes table, the DISTINCT keyword would ignore 179 of them. You would have a list of the authors of all nodes in the nodes table. The output might look like this:
noder_name
----------
novasoy
siouxsie
jaubertmoniker
ophie
...
In a query where multiple columns are specified, DISTINCT returns only unique combinations of the columns. For instance, in this query
SELECT DISTINCT noder_name, node_type FROM nodes;
the output would be all unique combinations of the two columns. It might look like this:
noder_name node_type
---------- ---------
novasoy idea
novasoy thing
novasoy person
siouxsie idea
siouxsie person
...