Get startedGet started for free

Counting unique values

PoweredHomes is expanding internationally and needs to understand their current global reach. In your final exploration of the customers table you want to generate a summary of the countries you're already working with.

Use the AI assistant to generate this summary.

This exercise is part of the course

Introduction to SQL with AI

View Course

Exercise instructions

  • Write a prompt that counts the number of unique country values in the customers table.
  • Make sure the result is labeled using the alias unique_countries.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

SELECT COUNT(country) AS country_count
FROM customers;
Edit and Run Code