Search Postgresql Archives

Re: row numbering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# Karsten.Hilbert@xxxxxxx / 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux