I'm doing a package tracking feature for the website of a delivery service out here. I'm trying to perform an inner join based on the success of an if statement in my sql query.
inner join calendar_t cal on cal.week_id = wh.week_period inner join fiscal_year_t fy on fy.fiscal_year_id = wh.fiscal_year_id and fy.fiscal_year = cal.fiscal_year ...