SELECTing DISTINCT Data
Some databases can have duplicate records and sometimes, you'll find that you only want to list the different (distinct) values. You can use the SELECT DISTINCT
statement to do this, just like in the example below:
SELECT DISTINCT(marital)
FROM clients;
Easy, isn't it?
Try to solve the following challenge:
This exercise is part of the course
SQL Tutorial for Marketers
Exercise instructions
Show the distinct ages of the bank's clients.
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
