Search Postgresql Archives

Re: Complex query

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

 



On 31/03/2014 19:38, Leonardo M. Ramé wrote:
> Hi, I'm looking for help with this query. 
> 
> Table Tasks:
> 
> IdTask  StatusCode  StatusName
> ----------------------------------
> 1       R           Registered
> 1       S           Started
> 1       D           Dictated
> 1       F           Finished
> 1       T           Transcribed
> ----------------------------------
> 2       R           Registered
> 2       S           Started
> 2       T           Transcribed
> 2       F           Finished
> 
> As you can see, I have a table containing tasks and statuses. What I
> would like to get is the list of tasks, including all of its steps, for
> only those tasks where the StatusCode sequence was S followed by T.

How do you know the sequence in which the statuses occurred? Is there
another column with a timestamp or something?

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@xxxxxx


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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