Query editor
WITH failedProposals AS (SELECT COUNT(id) as failedAmount FROM (VALUES (253), (257), (266), (267), (270), (271), (279), (289), (290), (291), (300), (325)) AS failed(id)),fromTo as (select firstPropId, lastPropIdfrom (VALUES (251, 329)) as fromTo(firstPropId, lastPropId)),info as (select * from failedProposals fpcross join fromTo ft)select lastPropId - firstPropId - failedAmount as totalProposalsfrom info