From: Michael Stoyanovich <mstoyanovich@strategy-network.com>
To: pgsql-php@postgresql.org
Subject: Combine/trim records
Date: Tue, 20 Jan 2004 14:56:47 -0500
Message-ID: <BC32F22F.1BA7%mstoyanovich@strategy-network.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: mstoyanovich@strategy-network.com
Subject: Re: Combine/trim records
In-Reply-To: <BC32F22F.1BA7%mstoyanovich@strategy-network.com>
References: <BC32F22F.1BA7%mstoyanovich@strategy-network.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox