Calculation on aggregate


I need to calculate a rate, how can I do it with the query builder ?

The SQL query would be :

SELECT ALL SUM(percent_value = 1) / COUNT(*)
FROM my_table


Hi @sfa
Looks like you're searching for Custom Expression SumIf([percent_value] = 1) / Count

Great :+1:

I discover Share() function too ( )

Thx !