pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
- Finding records in sequence
2+ messages / 2 participants
[nested] [flat]

* - Finding records in sequence
@ 2002-03-03 19:27  John Oakes <john@networkproductions.net>
  0 siblings, 1 reply; 2+ messages in thread

From: John Oakes @ 2002-03-03 19:27 UTC (permalink / raw)
  To: pgsql-sql

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!

John Oakes





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: - Finding records in sequence
@ 2002-03-03 20:55  Josh Berkus <josh@agliodbs.com>
  parent: John Oakes <john@networkproductions.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Josh Berkus @ 2002-03-03 20:55 UTC (permalink / raw)
  To: John Oakes <john@networkproductions.net>; +Cc: pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-03-03 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-03-03 19:27 - Finding records in sequence John Oakes <john@networkproductions.net>
2002-03-03 20:55 ` Josh Berkus <josh@agliodbs.com>

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