CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Introduction to SQL with AI

Afficher le cours

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.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

SELECT COUNT(country) AS country_count
FROM customers;
Modifier et exécuter le code