Description
TheIf combinator can be applied to the count
function to count the number of rows where the condition is true,
using the countIf aggregate combinator function.
Example usage
In this example, weโll create a table that stores user login attempts, and weโll usecountIf to count the number of successful logins.
Query
countIf function will count only the rows where is_successful = 1 for each user.
Response