Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.074 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.00; 'sql.': 0.07; '(aka': 0.09; 'analytic': 0.09; 'subject:process': 0.09; 'jan': 0.12; 'wrote:': 0.18; 'to:name:python-list@python.org': 0.22; 'header:In-Reply- To:1': 0.27; '[1]': 0.29; '[2]': 0.30; 'larry': 0.31; 'received:google.com': 0.35; 'there': 0.35; 'subject:data': 0.36; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'message- id:@gmail.com': 0.38; 'window': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; '12,': 0.39; 'to:addr:python.org': 0.39; 'url:3': 0.61; 'header:Message-Id:1': 0.63; '2014,': 0.84; 'functions)': 0.84; 'url:cd': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=vdi9z4+vcp+cNx6fcUNHFYMY5X18Xvl751ezMfx7wpo=; b=hiifp3tWnOZJkrJ3D96diFIQa4du8NGfhbes8BeQf2uGSIjBRwCtkPFPhuAGv7hUM4 TGKFELcTiq2YyC+rB+WSWhFT8ViwfTcOgTHtvEQ3ZlcoHt+0uDGVvus4tz8Hl7q0tzfk xU4lx/jOZuwW7IRKImFaCdIAfZpplCMqct1+V56Qfy9Tb3neoOwEbSttr8LK8LUznw+i 5pEvM2Ec7C01ooZmpdXAukE8nO8yuww3SLqvz8HP2ouqo9tlXlGtHkvg5JRl/H0XHWu+ Z4YkAhmErpsFd5EVV4nw+pfhR+q//w3RVQE3RRHHBoM61vuEg+inwwvyCobgV8YUaDnh GF/g== X-Received: by 10.14.211.69 with SMTP id v45mr22763386eeo.75.1389556415288; Sun, 12 Jan 2014 11:53:35 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: efficient way to process data From: Petite Abeille In-Reply-To: Date: Sun, 12 Jan 2014 20:53:02 +0100 Content-Transfer-Encoding: quoted-printable References: To: "python-list@python.org" X-Mailer: Apple Mail (2.1827) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389557901 news.xs4all.nl 2924 [2001:888:2000:d::a6]:41059 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63800 On Jan 12, 2014, at 8:23 PM, Larry Martell = wrote: > AFAIK, there is no way to do this in SQL. Sounds like a job for window functions (aka analytic functions) [1][2]. [1] http://www.postgresql.org/docs/9.3/static/tutorial-window.html [2] = http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions004.htm#SQL= RF06174=