I have an SQL query like :
SELECT SUM(CASE WHEN <table_name>.status = '2' THEN 1 ELSE 0 END) FROM <table name>
.
I want to write the corresponding Ecto Query for the above. Something like:
from t in <table_name>, select: sum(...)
What is the analogy to "case-when" in the above case?