Skip site navigation (1) Skip section navigation (2)

apply limit to sum function

From: e-letter <inpost(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: apply limit to sum function
Date: 2012-04-27 19:27:09
Message-ID: CAET1fe7eu-Es13-Zn1oEV+nZVaQGZFa=v9w8t2JT-TditcfWRg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
Readers,

 Is it possible to apply the 'sum' function, but limit the value and
 then show the tuples of the result? For example, the table has:

 text1, 10
 text2, 12,
 text3, 23

 Instead of applying the 'sum' function to all values, the request is
 to be able to select those values that result in a sum of a target
 value (e.g. < 22) and then return the tuples.

Responses

pgsql-novice by date

Next:From: Steve CrawfordDate: 2012-04-27 19:59:31
Subject: Re: apply limit to sum function
Previous:From: Bartosz DmytrakDate: 2012-04-25 21:01:32
Subject: Re: Returning generated id after a transaction.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group