LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Introduction to SQL with AI

Kurs anzeigen

Anleitung zur Übung

  • Write a prompt that tells the AI to return a list of distinct customer IDs.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

SELECT customer_id
FROM orders;
Code bearbeiten und ausführen