Which of the following commands will return the number of null values in the member_id column?
Which of the following commands will return the number of null values in the member_id column?
To get the number of null values in the member_id column, use the command 'SELECT count_if(member_id IS NULL) FROM my_table;'. The function count_if checks for rows that meet a specific condition, in this case, whether member_id is NULL.
https://docs.databricks.com/en/sql/language-manual/functions/count_if.html
Ans C : https://docs.databricks.com/en/sql/language-manual/functions/count.html Returns A BIGINT. If * is specified also counts row containing NULL values. If expr are specified counts only rows for which all expr are not NULL. If DISTINCT duplicate rows are not counted.
count_if() can be used in this scenario
C is correct
C: There are no 'null' and 'count_null' functions in SparkSQL