I do not understand why I am getting this error. I have joined the table correctly, is this not sufficient?
forge=> select * FROM generate_series('2016-01-22', '2017-12-31', '1 day'::interval) AS day LEFT JOIN ( select *, generate_series(c.start_time, c.end_time, '2 week'::interval) meeting from call_schedule c join call_durations cds on c.duration_id=cds.id where call_frequency_id = 5 ) c on ((day, '1 day'::interval) OVERLAPS (meeting, cds.duration * '1s'::interval)); ERROR: missing FROM-clause entry for table "cds" LINE 7: ...c on ((day, '1 day'::interval) OVERLAPS (meeting, cds.durati...