> 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; ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate