Making queries DISTINCT
You've learned that the DISTINCT
keyword can be used to return unique values in a field.
The books
table contains 350 books, representing all of the books that our local library has available for checkout.
But how many different authors are represented in these 350 books?
This exercise is part of the course
Introduction to SQL
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
-- Select unique authors from the books table
SELECT ___
FROM ___;