Ultimate access to all questions.
How can the count_if
function and counting NULL values be utilized in the following scenario?
Given a table random_values
with the data below, what would be the output of this query?
SELECT
count_if(col1 > 1) AS count_a,
count(*) AS count_b,
count(col1) AS count_c
FROM random_values
Data in random_values
:
0
1
2
NULL
2
3