
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
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
```*
0
1
2
NULL
2
3
```*
A
3 6 5
B
4 6 5
C
3 6 6
D
4 6 6