Distinct values
You're exploring the orders table, which includes every order placed by each customer. You want to see which customers have made purchases, but the orders table shows repeat customers multiple times. You need a clean list without duplicates.
Get each customer to appear only once to show who has placed at least one order.
Este exercício faz parte do curso
Introduction to SQL with AI
Instruções do exercício
- Write a prompt that tells the AI to return a list of distinct customer IDs.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
SELECT customer_id
FROM orders;