CommencerCommencer gratuitement

Counting values

You suspect some customer records are incomplete. Rather than counting all records, you want to know how many customers have a value in the country field.

Count only customers that include country data to check data completeness.

Cet exercice fait partie du cours

Introduction to SQL with AI

Afficher le cours

Instructions

  • Describe what you want to see so the AI generates a query that counts only customers who have a value in the country field.
  • Include a label for the result using the alias country_count.

Exercice interactif pratique

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

SELECT COUNT(*) AS total_count
FROM customers;
Modifier et exécuter le code