- 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: COUNT, SUM, AVG, MIN & MAX
This SQL quiz covers the aggregate functions COUNT, SUM, AVG, MIN and MAX. You will predict their results, see how they work on text and expressions, and learn why an aggregate cannot go in WHERE.
Domanda di esempio
Domanda 1 di 10What does this query return?
CREATE TABLE sales (item TEXT, qty INTEGER, price INTEGER);
INSERT INTO sales VALUES ('pen', 3, 2), ('book', 1, 12), ('mug', 2, 8), ('pen', 4, 2);
SELECT COUNT(*) FROM sales;
Mostra la risposta
B. 4 COUNT(*) counts rows, and the table has 4. It does not count different items (that would be COUNT(DISTINCT item), which is 3) or add up quantities.
Cosa copre questo quiz
- Counting rows with
COUNT(*) - Totals and averages with
SUMandAVG MINandMAXon numbers and text- Aggregating an expression like
SUM(qty * price) - Why
WHERE qty = MAX(qty)fails
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.