There is postgres sql query, shown below:
Select agencyId, SUM(open),
from agencies
where agency_id= 100 and agency_platform = any(@platformIds)
GROUP BY agencyId;
If platformIds list is empty then this query doesn't return any data, and on the other hand below query data with no issues:
Select agencyId, SUM(open),
from agencies
where agency_id= 100
GROUP BY agencyId;
any thoughts?