Add calculated fields from one table to other table

Поиск
Список
Период
Сортировка
От roopa perumalraja
Тема Add calculated fields from one table to other table
Дата
Msg-id 20061026010736.67473.qmail@web50815.mail.yahoo.com
обсуждение исходный текст
Ответы Re: Add calculated fields from one table to other table  ("Aaron Bono" <postgresql@aranya.com>)
Re: Add calculated fields from one table to other table  (Richard Broersma Jr <rabroersma@yahoo.com>)
Re: Add calculated fields from one table to other table  (chester c young <chestercyoung@yahoo.com>)
Список pgsql-sql
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 average price & volume from tick table for each ticker and for every minute and add those fields to timeseries table. Can anyone please help me out with the sql query.
 
Note: The ticker in the tick table also has duplicate values, so i am not able to create relation between two tables.
 
Thanks in advance
Roopa


Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.

В списке pgsql-sql по дате отправления:

Предыдущее
От: Richard Broersma Jr
Дата:
Сообщение: Re: delete on cascade
Следующее
От: "Aaron Bono"
Дата:
Сообщение: Re: Add calculated fields from one table to other table