Kashmir <kashmir_us_1999@xxxxxxxxx> writes: > being a sql-lamer, i used some query builder help to build my query (which served me quite well in the past for all my 'complicated' sqls), and was suggested for f_rrd_id=444 to use something as: > SELECT > td_fetch1m_by_rrd_id.f_timestamp, > td_fetch_by_rrd_id.f_ds, > td_fetch_by_rrd_id.f_ds, > td_fetch1m_by_rrd_id.f_ds, > td_fetch1m_by_rrd_id.f_us > FROM td_fetch_by_rrd_id > RIGHT JOIN td_fetch1m_by_rrd_id ON td_fetch_by_rrd_id.f_timestamp=td_fetch1m_by_rrd_id.f_timestamp > WHERE td_fetch1m_by_rrd_id.f_rrd_id=444 > ORDER BY td_fetch1m_by_rrd_id.f_timestamp; Seems like that should be a LEFT JOIN, if you're expecting there to be missing values in td_fetch_by_rrd_id rather than the other. The WHERE and ORDER BY clauses don't look right either unless LEFT was meant. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general