Instruction
Great. As you probably expect, we can also add the DISTINCT keyword to any columns that we pass in to our COUNT() function:
SELECT COUNT(DISTINCT CustomerId) AS DistinctCustomer FROM Order;
This time, we count the number of unique CustomerIds. In other words, this instruction tells us how many different customers have placed an order so far. If a customer places five orders, the customer will only be counted once.
Exercise
Count how many different positions there are in the Employee table. Name the column DistinctPositions.
Stuck? Here's a hint!
Type:
SELECT COUNT(DISTINCT Position) AS DistinctPositions FROM Employee;



