I have a table with two column like below:
name marks
A 15
B
c 20
As is clear from above, column name has 3 non-null values and 1 null value, similarly column marks has 2 null as well 2 non-null values.
What's the query to get this result?
count(columnname)counts only non-null values.count(*)counts all rows. Now you do the math!