pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: John Oakes <john@networkproductions.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: - Finding records in sequence
Date: Sun, 03 Mar 2002 12:55:49 -0800
Message-ID: <web-815464@davinci.ethosmedia.com> (raw)
In-Reply-To: <001501c1c2e9$6b35a1d0$cb842341@john>

Mr. Oakes,

> I have a table with a few columns, one of which is Pass/Fail.  I want
>  to
> find the most passes in sequence in the table and the most failures
>  in
> sequence in the table.  Is there a function to do this, or will I
>  need to
> create one?  Thanks!

You'll need to create one.  For your sake, I hope that you created the
 table with either a timestamp or a serial column so that you can
 determin the sequence of records.

Since your problem is procedural rather than set-oriented in nature,
 you will have an easier time implementing it in a procedural interface
 language (like Perl or C) than in SQL.

-Josh



view thread (2+ messages)

Message-ID: <web-815464@davinci.ethosmedia.com>
Permalink:  ../web-815464@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-815464@davinci.ethosmedia.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, john@networkproductions.net
  Subject: Re: - Finding records in sequence
  In-Reply-To: <web-815464@davinci.ethosmedia.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