pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: chester c young <chestercyoung@yahoo.com>
To: roopa perumalraja <roopabenzer@yahoo.com>
Cc: sql pgsql <pgsql-sql@postgresql.org>
Subject: Re: Add calculated fields from one table to other table
Date: Thu, 26 Oct 2006 08:29:00 -0700 (PDT)
Message-ID: <20061026152900.21557.qmail@web54305.mail.yahoo.com> (raw)
In-Reply-To: <20061026010736.67473.qmail@web50815.mail.yahoo.com>

roopa perumalraja <roopabenzer@yahoo.com> 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 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
      

---------------------------------
You can't get there from here.  It is like saying a hitter has a .250 average and in this game he was 2 for 4, what's his average?  Timeseries must also have quantity and price, just as you would need to know number of bats and hits for the baseball player.


 				
---------------------------------
Want to be your own boss? Learn how on  Yahoo! Small Business. 

view thread (18+ messages)  latest in thread

Message-ID: <20061026152900.21557.qmail@web54305.mail.yahoo.com>
Permalink:  ../20061026152900.21557.qmail@web54305.mail.yahoo.com/
Also on:    postgresql.org/message-id/20061026152900.21557.qmail@web54305.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: chestercyoung@yahoo.com, roopabenzer@yahoo.com
  Subject: Re: Add calculated fields from one table to other table
  In-Reply-To: <20061026152900.21557.qmail@web54305.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox