A couple of months or so ago, I began talking about SQL functions and what they're used for. This article picks up where I left off. It defines the two types of functions, and begins to explain them in great detail.
Let's step away from the lawsuit scenario for a moment. Let's add a new column to our table called Position. Fill in your database with the added values below.
King Kong Wong
Actor created solely for toy sales
If we wanted to know how many unique positions there were (or any other unique items) we could use the Count(Distinct) function. As you can see, there are presently 5 positions in the company. What we want to know though is how many positions there are that don't duplicate themselves.
Select Count (Distinct Position) from Employees
This is because the Villain position is a duplicate, and thus one value is not unique.