Re: [SQL] Flatten table using timestamp and source

2012-05-25 Thread Raj Mathur (राज माथुर)
On Saturday 26 May 2012, Raj Mathur (राज माथुर) wrote: > On Friday 25 May 2012, Raj Mathur (राज माथुर) wrote: > > On Thursday 24 May 2012, Elrich Marx wrote: > > > If source changes, in this case from 1 to 2, then etime would be > > > the last value of stime for source =1; So for source 1 it starts

Re: [SQL] Flatten table using timestamp and source

2012-05-25 Thread Raj Mathur (राज माथुर)
On Friday 25 May 2012, Raj Mathur (राज माथुर) wrote: > On Thursday 24 May 2012, Elrich Marx wrote: > > If source changes, in this case from 1 to 2, then etime would be > > the last value of stime for source =1; So for source 1 it starts > > at stime 13:00 and continues till 13:02 (etime). > > > >

Re: [SQL] Flatten table using timestamp and source

2012-05-24 Thread Raj Mathur (राज माथुर)
13:01 | 1970-01-01 07:14:01 9 | 1970-01-01 07:15:01 | 1970-01-01 07:17:01 Regards, -- Raj > -Original Message- > From: pgsql-sql-ow...@postgresql.org > [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Raj Mathur (??? > ?) > Sent: 24 May 2012 01:59 PM > To:

Re: [SQL] Flatten table using timestamp and source

2012-05-24 Thread Elrich Marx
? -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Raj Mathur (??? ?) Sent: 24 May 2012 01:59 PM To: pgsql-sql@postgresql.org Subject: Re: [SQL] Flatten table using timestamp and source On Thursday 24 May 2012, Elrich Marx wrote: > I

Re: [SQL] Flatten table using timestamp and source

2012-05-24 Thread Raj Mathur (राज माथुर)
On Thursday 24 May 2012, Elrich Marx wrote: > I am quite new to Postgres, so please bear with me. > > I have a table with data in the following format: > > Table name : Time_Source_Table > > Source , Stime > 1, "2012-05-24 13:00:00" > 1, "2012-05-24 13:01:00" > 1, "2012-05-24 13:02:00" > 2, "20