X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 00B51D1E8CD for ; Tue, 20 Jan 2004 20:33:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 30487-02 for ; Tue, 20 Jan 2004 16:32:54 -0400 (AST) Received: from smtp3.webcontrolcenter.com (smtp3.webcontrolcenter.com [216.119.106.215]) by svr1.postgresql.org (Postfix) with SMTP id 4549FD1ECD9 for ; Tue, 20 Jan 2004 15:57:10 -0400 (AST) Received: (qmail 9091 invoked from network); 20 Jan 2004 19:55:01 -0000 Received: from mail5.webcontrolcenter.com (216.119.106.46) by smtp3.crystaltech.com with SMTP; 20 Jan 2004 19:55:01 -0000 Received: from 68-79-127-234.ded.ameritech.net [68.79.127.234] by mail5.webcontrolcenter.com with SMTP; Tue, 20 Jan 2004 12:56:15 -0700 User-Agent: Microsoft-Entourage/10.1.4.030702.0 Date: Tue, 20 Jan 2004 14:56:47 -0500 Subject: Combine/trim records From: Michael Stoyanovich To: Message-ID: Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3157455408_4977528" X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_30_40, USER_AGENT X-Spam-Level: X-Archive-Number: 200401/23 X-Sequence-Number: 2539 > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3157455408_4977528 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit I have a table of log entries (each record represents 15 minutes). I'd like to combine adjacent entries when the project id (pid) is the same. Any suggestions on how to combine/trim these records with Postgres? Or any other non PG solution? Before: LogID Date StartTime EndTime Duration PID Description 10001 2004-01-16 08:00:00 08:15:00 0.25 1 foo 10002 2004-01-16 08:15:00 08:30:00 0.25 1 bar After: LogID Date StartTime EndTime Duration PID Description 10001 2004-01-16 08:00:00 08:30:00 0.5 1 foo bar Thank you in advance... -- Michael Stoyanovich Strategy Network Inc. mstoyanovich@strategy-network.com --B_3157455408_4977528 Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable Combine/trim records I have a table= of log entries (each record represents 15 minutes).  I'd like
to combine adjacent entries when the project id (pid) is the same.  An= y
suggestions on how to combine/trim these records with Postgres? Or any othe= r non PG solution?

Before:
LogID   Date        StartTime =   EndTime     Duration    PID =     Description
10001   2004-01-16  08:00:00    08:15:00 &nbs= p;  0.25          &n= bsp;  1       foo
10002   2004-01-16  08:15:00    08:30:00 &nbs= p;  0.25          &n= bsp;  1       bar

After:
LogID   Date        StartTime =   EndTime     Duration    PID =     Description
10001   2004-01-16  08:00:00    08:30:00 &nbs= p;  0.5          &nb= sp;    1       foo bar

Thank you in advance...

--
Michael Stoyanovich
Strategy Network Inc.
mstoyanovich@strategy-network.com
--B_3157455408_4977528--