I have ticket sale data joined with the Date dimension table.. This is going for product join. Is there a way that the construct of the qry could be changed?
c.dprt_dt,c.issued_dt,i.calendar_dt,i.calendar_dt + 364 calendar_dt1, c.dprt_dt + 364 as Dprt_dt1,last_day(Dprt_dt1) as last_day_dprt_dtl,
from DB1.Ticket_sale_cons c
inner join DB2.date_dimension i
on i.calendar_dt <= c.issued_dt
and calendar_dt1 <= last_day_dprt_dtl
and calendar_dt1 <= '2019-07-06'
where Dprt_dt1 between '2019-03-31' and '2019-11-30'
and c.issued_dt between c.dprt_dt - 330 and current_date - 14 - 364
and c.oper_carr_cd in ('xx','yy','zz','aa')
If you have no equality conditions in the ON clause, you will get a product join.
Do you really want to join each ticket sale to all prior calendar dates in the date dimension?