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).

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes