9
sql
-- Show all book titles from the checkout history (including duplicates)
SELECT title
FROM book_checkouts;
-- Show only unique book titles
SELECT DISTINCT title
FROM book_checkouts;
-- Rename columns in the output for clarity
SELECT title AS book_title, member_id AS borrower
FROM book_checkouts;
-- Combine DISTINCT with alias
SELECT DISTINCT title AS unique_title
FROM book_checkouts;
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.