Distinct on multiple fields
Marketing wants to understand customer purchase frequency by looking at unique customer-date combinations. This will help them spot patterns in buying behavior across different time periods.
Use the AI assistant to generate a query that shows distinct customer-date pairs.
Este ejercicio forma parte del curso
Introduction to SQL with AI
Instrucciones del ejercicio
- Give the AI a clear instruction to return each unique combination of customer ids and order dates.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
SELECT customer_id
FROM orders;