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.
Diese Übung ist Teil des Kurses
Introduction to SQL with AI
Anleitung zur Übung
- 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
.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
SELECT COUNT(*) AS total_count
FROM customers;