Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38100
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.szaf.org!news.gnuher.de!.POSTED!not-for-mail |
|---|---|
| From | Steffen Mutter <steffen@webanimations.de> |
| Newsgroups | comp.lang.python |
| Subject | Improve reduce functions of SQLite3 request |
| Date | Sun, 3 Feb 2013 09:46:08 +0000 (UTC) |
| Organization | GNUher.de |
| Lines | 42 |
| Message-ID | <kelbl0$1jv$1@nerdhammel.gnuher.de> (permalink) |
| NNTP-Posting-Host | localhost |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | nerdhammel.gnuher.de 1359884768 1663 127.0.0.1 (3 Feb 2013 09:46:08 GMT) |
| X-Complaints-To | newsmaster@gnuher.de |
| NNTP-Posting-Date | Sun, 3 Feb 2013 09:46:08 +0000 (UTC) |
| User-Agent | XPN/1.2.6 (Street Spirit ; Linux) |
| Xref | csiph.com comp.lang.python:38100 |
Show key headers only | View raw
Hi, I am writing some code to manage handball leagues more easy. Problem: MISSON: Get single club ids glued together with the shortest teamname. EXAMPLE: SELECT homenr as nr, home as club FROM Runde20122013 WHERE place="karlsruhe" UNION SELECT guestnr as nr, guest as club FROM 20122013 WHERE place="karlsruhe" GROUP BY nr LIMIT 10 ACTUAL RESULT: 359|TV Calmbach 21101|SG Heidel/Helm 21236|JSG Neuth/Büch 23108|TG Eggenstein 23108|TG Eggenstein 2 23109|TV Ettlingenw 23109|TV Ettlingenw 2 23112|TSV Jöhlingen 23112|TSV Jöhlingen 2 23112|TSV Jöhlingen 3 NEEDED RESULT: 359|TV Calmbach 21101|SG Heidel/Helm 21236|JSG Neuth/Büch 23108|TG Eggenstein 23109|TV Ettlingenw 23112|TSV Jöhlingen the nr needs to be unique together with the shortest clubname returned by the where clause. Any hints how to get this done either with SQLite3 tecneeqs or python functions. Kind regards. SMut
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Improve reduce functions of SQLite3 request Steffen Mutter <steffen@webanimations.de> - 2013-02-03 09:46 +0000
Re: Improve reduce functions of SQLite3 request Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-03 13:11 -0500
Re: Improve reduce functions of SQLite3 request Steffen Mutter <steffen@webanimations.de> - 2013-02-04 14:30 +0000
Re: Improve reduce functions of SQLite3 request Dave Angel <davea@davea.name> - 2013-02-04 10:30 -0500
Re: Improve reduce functions of SQLite3 request Peter Otten <__peter__@web.de> - 2013-02-04 17:29 +0100
Re: Improve reduce functions of SQLite3 request Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-04 15:45 -0500
Re: Improve reduce functions of SQLite3 request Steffen Mutter <steffen@webanimations.de> - 2013-02-04 22:05 +0000
Re: Improve reduce functions of SQLite3 request Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-04 18:47 -0500
Re: Improve reduce functions of SQLite3 request Steffen Mutter <steffen@webanimations.de> - 2013-02-06 09:18 +0000
Re: Improve reduce functions of SQLite3 request Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-06 12:26 -0500
Re: Improve reduce functions of SQLite3 request Steffen Mutter <steffen@webanimations.de> - 2013-02-06 23:33 +0000
Re: Improve reduce functions of SQLite3 request Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-07 00:40 -0500
Re: Improve reduce functions of SQLite3 request Steffen Mutter <steffen@webanimations.de> - 2013-02-07 11:33 +0000
Re: Improve reduce functions of SQLite3 request Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-07 13:03 -0500
Re: Improve reduce functions of SQLite3 request Steffen Mutter <steffen@webanimations.de> - 2013-02-07 22:54 +0000
Re: Improve reduce functions of SQLite3 request Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-08 12:17 -0500
Re: Improve reduce functions of SQLite3 request Steffen Mutter <steffen@webanimations.de> - 2013-02-08 19:59 +0000
csiph-web