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.
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 The result: 4 This is because the Villain position is a duplicate, and thus one value is not unique.
blog comments powered by Disqus |