Is it possible to do sums of aggregation that stops aggregating once the condition is reached?
If you don't care what order your rows that contribute to the sum is in:

select * from (
    select ...n sum(amount) over () as sm
    from ...
    where ...
) as x
where sm &gt; 100


If you do care about the order, you should add info on how the cumulative sum is calculated:

select * from (
    select ...n sum(amount) over (order by ...) as sm
    from ...
    where ...
) as x
where sm &gt; 100


You may even sumarise per something like:

select * from (
    select ...n sum(amount) over (partition by ... 
                                  order by ...) as sm
    from ...
    where ...
) as x
where sm &gt; 100


However, since you are talking about stopping, when the sum reaches something I suggest what you need is something like:

select * from (
    select ...n sum(amount) over (partition by ... 
                                  order by ...) as sm
    from ...
    where ...
) as x
where sm &lt;= 100