Re: row numbering - Mailing list pgsql-general

From Roman Neuhauser
Subject Re: row numbering
Date
Msg-id 20050309124038.GA25290@isis.wad.cz
Whole thread Raw
In response to Re: row numbering  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Responses Re: row numbering  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
# Karsten.Hilbert@gmx.net / 2005-03-01 17:41:46 +0100:
> > > There are 5 vaccinations in a given vaccination schedule.
> > >
> > > Patient had 3 shots.
> > >
> > > I want the view to show me that shot 4 and 5 are missing
> > > without having to enter the cardinality of the vaccination in
> > > the original data.

    I don't know that much about medicine, so this might be a funny
    question, but do you really need to know that "shots 4 and 5 are
    missing", or just that the patient needs to be shot two more times,
    or do you really want the *application dates*?

> Here is the bit of data that I forgot to mention: Those
> consecutive immunization rows *are* ordered by a sort key that
> the application assigns -- the date of application. So,
> basically, what I want to do is the following (high level):
>
> 1) read given vaccinations from table
> 2) order by date_given
> 3) assign ordinals to the rows in the order obtained by 2)
> 4) deduce missing shots by joining to another table that
>    defines the number of vaccinations in a schedule

    This is a description of steps you decided would get you to your
    goal. Instead of describing the steps, what's the goal?

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

pgsql-general by date:

Previous
From: Pruteanu Dragos
Date:
Subject: out of memory problem
Next
From: Richard Huxton
Date:
Subject: Re: out of memory problem