Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.045 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'sql.': 0.07; '(aka': 0.09; 'analytic': 0.09; 'subject:process': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'wrote:': 0.18; 'pfxlen:0': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; '[1]': 0.29; '[2]': 0.30; 'message- id:@mail.gmail.com': 0.30; 'larry': 0.31; 'this.': 0.32; 'received:google.com': 0.35; 'there': 0.35; 'subject:data': 0.36; 'url:org': 0.36; 'window': 0.38; 'pm,': 0.38; 'does': 0.39; '12,': 0.39; 'skip:u 10': 0.60; 'url:3': 0.61; 'to:addr:gmail.com': 0.65; '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=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=N9tKxMPczFXB1/tc/k2WanUI7nx9YsTAWJz9MjICcqI=; b=VE0Dri3vFrb3sU8QuZ8dr0TXRxISY4ydVvkaYzhCuFjngjdsEz5+XEMw5TmbRIW2G4 dYin0W2Kg6uq9AYJnfp8TRzWs1ETQu3Z08m0YG9XV09fhPSE6QBxlsbi1py6UyJzn3W+ V1EZdvL2tZGLQrh/HMSh7fyUEUxh3TTp9UiMW/JXOKcMbY1d4TgyTrQTRW0/hBKMQvdE AyaFR0Nl0wPG0UjLle9s6gpb+6hZt8gFN6mLoSTArVKMeSTnJ0hQkQFOiGL9J0466Qi7 kU8VRbYN6PqoKhOiogHNrkcVxI8X32PUkGGiv5dCrUqbwx7nN+/prnIaPwLI2gqaxlq2 ZWmw== MIME-Version: 1.0 X-Received: by 10.180.149.175 with SMTP id ub15mr13430796wib.10.1389583029291; Sun, 12 Jan 2014 19:17:09 -0800 (PST) In-Reply-To: <101148D9-DACE-4572-801D-3DDB4A215BF9@gmail.com> References: <101148D9-DACE-4572-801D-3DDB4A215BF9@gmail.com> Date: Sun, 12 Jan 2014 22:17:09 -0500 Subject: Re: efficient way to process data From: Larry Martell To: Petite Abeille Content-Type: text/plain; charset=UTF-8 Cc: "python-list@python.org" 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389583031 news.xs4all.nl 2914 [2001:888:2000:d::a6]:46339 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63808 On Sun, Jan 12, 2014 at 2:53 PM, Petite Abeille wrote: > > 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#SQLRF06174 Unfortunately, MySQL does not support this.