Given the People table:
+-----+--------------+-------+
|Num  |  Name        | Amount|
+-----+--------------+-------+
|  1  | Kate         |  15   |
|  2  | Misha        | NULL  |
|  3  | Nick         |  0    |
|  4  | Larisa       |  20   |
+-----+--------------+-------+
What will be the result of the following query execution?
SELECT COUNT(Amount) FROM People;
Explanation
Aggregate functions (like COUNT() in our case) ignore NULL values (i.e., number of records with not NULL value will be returned).

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты