X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1496B5348D for ; Tue, 10 May 2005 18:52:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72306-09 for ; Tue, 10 May 2005 21:52:34 +0000 (GMT) Received: from gpmail.gphq.genpathpharma.com (67.109.105.227.ptr.us.xo.net [67.109.105.227]) by svr1.postgresql.org (Postfix) with ESMTP id 109F853D05 for ; Tue, 10 May 2005 18:52:32 -0300 (ADT) X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: interesting SQL puzzle - concatenating column with itself. Date: Tue, 10 May 2005 17:53:59 -0400 Message-ID: <7A4ADADFC8AFF0478D47F63BEDD57CE3A27953@gpmail.gphq.genpathpharma.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] interesting SQL puzzle - concatenating column with itself. Thread-Index: AcVVoZAEXE+oFxgxTfyGGzQzz3NWLAACPtoQ From: "Dmitri Bichko" To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.257 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200505/123 X-Sequence-Number: 21436 > SELECT your_concat( memo_text ) FROM > (SELECT memo_id, sequence, memo_text FROM table ORDER BY memo_id, sequence =20 > OFFSET 0) AS foo > GROUP BY memo_id I'm just curious - what's the 'OFFSET 0' for? Dmitri