how to select rows for a sum function - Mailing list pgsql-novice

From e-letter
Subject how to select rows for a sum function
Date
Msg-id BANLkTinqrF5C9hB6cbkPhmK6kb7tq+dHcw@mail.gmail.com
Whole thread Raw
Responses Re: how to select rows for a sum function  (Frank Bax <fbax@sympatico.ca>)
List pgsql-novice
Readers,

For a table:

value name
10 text1
20 text2
30 text3
40 text4

The function SELECT ... WHERE cannot be used with an aggregate
function SUM. Is it possible to obtain a result of the rows where the
SUM<=number? Ideally, to obtain rows where the sum of values is
between an upper and lower value, e.g. if the target range is >=50 and
<=60, the result would be:

text1
text2
text3

or

text2
text4

Each result should go into a separate table

pgsql-novice by date:

Previous
From: Mike Thomsen
Date:
Subject: Log user creation and deletion
Next
From: "Birchall, Austen"
Date:
Subject: pg_stop_backup fails to complete