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 ejercicio forma parte del curso
Introduction to SQL with AI
Instrucciones del ejercicio
- Write a prompt that tells the AI to return a list of distinct customer IDs.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
SELECT customer_id
FROM orders;