このエラーは、次のSQLite
クエリで発生します。
select f.rid, c.title, sum(some_expression) as ratio
from doesntmatter
where c.active = 1 or (ratio = 1.0 and c.active = 0
and c.deactivated in (1, 2, 3, 4, 5)
group by f.rid
この質問は、次のhaving
節で解決します。
select f.rid, c.title, sum(some_expression) as ratio
from doesntmatter
where c.active = 1 or (c.active = 0
and c.deactivated in (1, 2, 3, 4, 5)
group by f.rid
having ratio = 1.0
しかし、私の場合、これは式のセマンティクスを変更します。where
元の節にある表現を実現する方法を知っていますか?