> I am sending you the create statement of tables & few insert statements as
> well. Hope this
> helps to solve the problem.
where are the insert statements? ;)
>
> CREATE TABLE ticks
> (
> tick_id int8 NOT NULL DEFAULT nextval(('ticks_s'::text)::regclass),
> ric varchar(30) NOT NUL
Hi Richard, Thanks a lot. I am sending you the create statement of tables & few insert statements as well. Hope this helps to solve the problem. CREATE TABLE ticks( tick_id int8 NOT NULL DEFAULT nextval(('ticks_s'::text)::regclass), ric varchar(30) NOT NULL, tick_date date NOT NULL,
> Hi Richard,
>
> Thanks a lot. I still am not able to get the result for all the rics in the
> ticks table but I
> am able to get the result for a particular ric.
>
> Can you help me with getting the result for all the rics in the ticks table
>
> Thanks
> Roopa
Could you send
Hi Richard, Thanks a lot. I still am not able to get the result for all the rics in the ticks table but I am able to get the result for a particular ric. Can you help me with getting the result for all the rics in the ticks table Thanks RoopaRichard Broersma Jr <[EMAIL PROTECTED]> wrot
> Thanks for your help. That does make sense, but I am not able to get the
> result what I wanted
> exactly. Let me explain you.
>
> I have ticks table in which I have columns like ric, tick_time, price &
> volume. The times
> table has just one column with times_time which has time data
Hi Richard, Thanks for your help. That does make sense, but I am not able to get the result what I wanted exactly. Let me explain you. I have ticks table in which I have columns like ric, tick_time, price & volume. The times table has just one column with times_time which has time data for
Roopa,Why dont you try putting in some case or decode with your first field, so incase if nothing is returned you explicitly make it 'A' kinds. Regards,Moiz Kothari
On 10/31/06, roopa perumalraja <[EMAIL PROTECTED]> wrote:
Hi Thanks a lot for your help. The query which you suggested gives me a
> select foo.ric, tm.times_time, count(tk.*), avg(tk.price),
> sum(tk.price*tk.volume)/sum(tk.volume), sum(tk.volume) from (select distinct
> ric from ticks) as
> foo, times tm left join ticks tk on tk.tick_time >= tm.times_time and
> tk.tick_time <
> (tm.times_time + '1 minute' :: interval)::t
Hi Thanks a lot for your help. The query which you suggested goes like this select foo.ric, tm.times_time, count(tk.*), avg(tk.price), sum(tk.price*tk.volume)/sum(tk.volume), sum(tk.volume) from (select distinct ric from ticks_20060404 where ric = 'TRB') as foo, times tm left join ticks_20
Hi Thanks a lot for your help. The query which you suggested gives me a result like this A | 12:00| 12 | 64.99 | 63.99 | 12:01 | 0 | | A | 12:02 | 5 | 36.99 | 32.99 but I wanted the result to look like this A | 12:00| 12 | 64.99 | 63.99 A | 12:01 | 0 | | A | 12:02 | 5 |
> Thanks a lot for your help. The query does work, but now I have a problem.
> The query goes like
> this:
>
> select tk.ric, tm.timeseries_time, count(tk.*), avg(tk.price),
> sum(tk.price*tk.volume)/sum(tk.volume), sum(tk.volume)
> from ticks tk, timeseries tm where tk.tick_time >= tm.t
Hi Roopa,If your timeseries table has records for all minutes, then you should outer join both tables so as to get the desired results you are looking for... try doing this.select tk.ric, tm.timeseries_time
, count(tk.*), avg(tk.price),sum(tk.price*tk.volume)/sum(tk.volume), sum(tk.volume)from tick
Hi Thanks a lot for your immediate reply. I want to explain more about it. The ticks table has many rows in each minute and timeseries table has 1 minute increment data. And the query is as mentioned below, which just displays the result for the minutes in which the tick data exists. but i wou
Hi Thanks a lot for your help. The query does work, but now I have a problem. The query goes like this: select tk.ric, tm.timeseries_time, count(tk.*), avg(tk.price), sum(tk.price*tk.volume)/sum(tk.volume), sum(tk.volume) from ticks tk, timeseries tm where tk.tick_time >= tm.timeseries_tim
roopa perumalraja <[EMAIL PROTECTED]> wrote: Hi I have two tables. Tick table has fields like ticker, time, price & volume and Timeseries table has fields like ticker, time, avg_price, avg_volume. The time field in Timeseries table is different from time in tick table, its the timeseries fo
> I have two tables. Tick table has fields like ticker, time, price & volume
> and Timeseries
> table has fields like ticker, time, avg_price, avg_volume.
>
> The time field in Timeseries table is different from time in tick table,
> its the timeseries
> for every minute. Now I want to ca
On 10/25/06, roopa perumalraja <[EMAIL PROTECTED]> wrote:
Hi I have two tables. Tick table has fields like ticker, time, price & volume and Timeseries table has fields like ticker, time, avg_price, avg_volume. The time field in Timeseries table is different from time in tick table, its the
Hi I have two tables. Tick table has fields like ticker, time, price & volume and Timeseries table has fields like ticker, time, avg_price, avg_volume. The time field in Timeseries table is different from time in tick table, its the timeseries for every minute. Now I want to calculate the a
18 matches
Mail list logo