...
От | Gan Uesli Starling |
---|---|
Тема | ... |
Дата | |
Msg-id | 20060131151028.17040.qmail@mail_102.selectedhosting.com обсуждение исходный текст |
Ответы |
Re:
Re: |
Список | pgsql-novice |
My problem is this: I have a table 'history' with columns for ''date_time', 'event', 'sensor'. The 'event' column may contain 'Calibrated', 'Damaged', 'Repaired'. Since it is a history, the same sensor may be listed multiple times with a date for each event. I want only the most recent calibration event for undamaged sensors. I am trying to figure out how to winnow out in a single query (no intermediate tables) the most recent event for each sensor which has been 'Calibrated' or 'Repaired' not 'Damaged' afterwards. I had thought it would be so simple. But after much wrangling I seem to be stumped. -- Mistera Sturno - Rarest Extinct Bird <(+)__ Gan Uesli Starling ((__/)=- Kalamazoo, MI, USA `||` ++ http://starling.us
В списке pgsql-novice по дате отправления: