- Esecutori
-
Impara
Impara Python Esempi eseguibili, NumPy, pandas e altro Impara l'IA / Machine LearningReti neurali, ML e LLM da zero Impara C e C++ Puntatori, memoria, STL e C++ moderno Impara C#Fondamenti, OOP, LINQ, async ed esercizi .NET Impara MatplotlibGrafici a linee, barre, dispersione e torta con visualizzatori Impara RustOwnership, trait, gestione degli errori e thread Impara GoSlice, interfacce, goroutine e canali Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++ Programmazione per bambini Impara a programmare giocando!
- QuizNuovo
- SfideNuovo
- Per docentiNuovo
- Aggiornamenti
- Offrimi un caffè
Quiz di SQL: DISTINCT
This SQL quiz is about SELECT DISTINCT and COUNT(DISTINCT ...). You will see how duplicates are judged across whole rows, how NULL and letter case behave, and where DISTINCT is allowed in a query.
Domanda di esempio
Domanda 1 di 10What does this query return?
CREATE TABLE orders (customer TEXT, city TEXT);
INSERT INTO orders VALUES ('Ana', 'Paris'), ('Ben', 'Rome'), ('Ana', 'Paris'), ('Cy', 'Paris'), ('Ben', 'Lyon');
SELECT DISTINCT customer FROM orders ORDER BY customer;
Mostra la risposta
B. Ana
Ben
Cy DISTINCT keeps one copy of each different row. Ana and Ben appear twice in the table but once in the result.
Cosa copre questo quiz
- Removing duplicate rows with
SELECT DISTINCT DISTINCTapplies to the whole row, not one column- Counting unique values with
COUNT(DISTINCT column) - How
NULLand letter case affect duplicates DISTINCTvsGROUP BY
Domande frequenti
Serve un account?
No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.
Posso rifarlo?
Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.