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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'sql.': 0.07; '(aka': 0.09; 'analytic': 0.09; 'back-end': 0.09; 'feasible.': 0.09; 'subject:process': 0.09; 'cc:addr:python-list': 0.11; 'jan': 0.12; 'wrote:': 0.18; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'header :In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'too.': 0.31; '13,': 0.31; 'larry': 0.31; 'received:google.com': 0.35; 'there': 0.35; 'subject:data': 0.36; 'done': 0.36; 'changing': 0.37; 'window': 0.38; 'pm,': 0.38; '12,': 0.39; 'though,': 0.39; 'either': 0.39; 'to:addr:gmail.com': 0.65; '2014,': 0.84; 'functions)': 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=xKwpCyIfzEJc/HssdBnkc5f2WzB+nxJFVbO51IMQc9A=; b=oTQueJbtIuXbzpKDXjl6cXbDzyE2CYmIQi/iSFFPjYZ7U6vh3URH7/UcUJ/SIKMNMt 9s4ASgIe8C1pHiO07PbxQ5N2K1inJTfPg8iBNi+dLAZf5A+BCJo+pKnOyBh9NSyKC/Ev TKKFQlKahHwMSMxrFBziLPeNFelkQesP+m9e65ZAhCiXr+Ew98woG3Oq58RK/awb/we6 gqQcLbGLJsjYgWUSRLF0vCCfASTFEJurxZByLS3JmR0rh4lGcm5CqfwTKoqkcraJSXBy uP+5c0dClZuBBzAOMCKLlpPVy7FCXJl9ySiBbNsRRorGlJxON8TvdYa3Dh4/Mc4NIA7U H0jA== MIME-Version: 1.0 X-Received: by 10.180.104.164 with SMTP id gf4mr12780900wib.35.1389583102563; Sun, 12 Jan 2014 19:18:22 -0800 (PST) In-Reply-To: References: <101148D9-DACE-4572-801D-3DDB4A215BF9@gmail.com> Date: Sun, 12 Jan 2014 22:18:22 -0500 Subject: Re: efficient way to process data From: Larry Martell To: Chris Angelico 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389583110 news.xs4all.nl 2939 [2001:888:2000:d::a6]:47927 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63809 On Sun, Jan 12, 2014 at 5:18 PM, Chris Angelico wrote: > On Mon, Jan 13, 2014 at 6:53 AM, 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]. > > That's my thought too. I don't think MySQL has them, though, so it's > either going to have to be done in Python, or the database back-end > will need to change. Hard to say which would be harder. Changing the database is not feasible.