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: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

 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.


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-2017 The PostgreSQL Global Development Group