SEL t1.name, t2.calendar_date
FROM (SEL name FROM hbarch.ram GROUP BY 1) AS t1, sys_calendar.Calendar AS t2
WHERE t2.calendar_date NOT IN (SEL tran_date FROM hbarch.ram WHERE name = t1.name)
AND t2.calendar_date >=(SEL MIN(tran_date) FROM hbarch.ram WHERE name = t1.name)
AND t2.calendar_date <= CURRENT_DATE
SEL t1.name, t2.calendar_date
FROM (SEL name FROM hbarch.ram GROUP BY 1) AS t1, sys_calendar.Calendar AS t2
WHERE t2.calendar_date NOT IN (SEL tran_date FROM hbarch.ram WHERE name = t1.name)
AND t2.calendar_date >=(SEL MIN(tran_date) FROM hbarch.ram WHERE name = t1.name)
AND t2.calendar_date <= CURRENT_DATE