So as example, in the picter bellow, I have simple table called students
. Some student has GPA = NULL.
I have a query to count DISTINCT GPA values :
SELECT count( DISTINCT GPA ) FROM `students`
Result, as expected, 2.
But also, I thought, I can count using PHP, and just write:
SELECT DISTINCT GPA FROM `students`
But why the result is 3 lines(not 2 as expected)?