Re: Add calculated fields from one table to other table

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Add calculated fields from one table to other table
Дата
Msg-id 50323.50500.qm@web31808.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: Add calculated fields from one table to other table  (roopa perumalraja <roopabenzer@yahoo.com>)
Ответы Re: Add calculated fields from one table to other table
Список 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 по дате отправления:

Предыдущее
От: roopa perumalraja
Дата:
Сообщение: Re: Add calculated fields from one table to other table
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Case Preservation disregarding case