Re: Add calculated fields from one table to other table - Mailing list pgsql-sql

From Richard Broersma Jr
Subject Re: Add calculated fields from one table to other table
Date
Msg-id 50323.50500.qm@web31808.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Add calculated fields from one table to other table  (roopa perumalraja <roopabenzer@yahoo.com>)
Responses Re: Add calculated fields from one table to other table
List pgsql-sql
> 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 create table statements for the tables you are working on, and a few insert
statements for each table to have sample data. then show what you want the query results to look
like.

But from what you stated in your previous emails here is what I gather: maybe it might work?

select    tk.ric as ric,          tm.times_time as minute, --timestamps by minutes         count(tk.*) as ,
...
from      times tm
left join ticks tk
on (tm.times_time = date_trunc('minutes', tk.time))
group by  ric, minute
order by  minute;






pgsql-sql by date:

Previous
From: roopa perumalraja
Date:
Subject: Re: Add calculated fields from one table to other table
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Case Preservation disregarding case