Ниже для BigQuery Standard SQL
#standardSQL
WITH `bigquery-project-123.emp` AS (
SELECT 1 EmpNo, 'IT101' EmpITPrj, NULL EmpFinPrj, NULL EmpHRPrj, NULL EmpIntPrj, '2019-09-01' EmpDate union all
SELECT 2, NULL, 'Fin101', NULL, NULL, '2001-06-05' union all
SELECT 3, NULL, 'Fin102', NULL, NULL, '2005-11-25' union all
SELECT 4, NULL, NULL, NULL, 'Int501', '2010-10-15' union all
SELECT 5, NULL, NULL, NULL, 'Int105', '2019-01-10' union all
SELECT 6, NULL, NULL, NULL, 'Int444', '2015-12-03' union all
SELECT 7, NULL, NULL, 'HR110', NULL, '2012-08-19' union all
SELECT 8, 'IT101', NULL, NULL, NULL, '2011-04-24' union all
SELECT 9, NULL, NULL, 'HR105', NULL, '2005-02-09' union all
SELECT 10, 'IT102', NULL, NULL, NULL, '2006-07-11'
), `bigquery-project-123.prj` AS (
SELECT 'Fin102' PrjID, '10/14/2005' PrjStartDate, '12/14/2005' PrjEndDate union all
SELECT 'IT102', '07/11/2006', '10/30/2006' union all
SELECT 'IT110', '11/15/2010', '01/31/2011' union all
SELECT 'Int101', '01/01/2015', '03/31/2015' union all
SELECT 'HR110', '05/19/2012', '08/19/2012' union all
SELECT 'Int444', '01/01/2015', '03/01/2015'
)
SELECT *
FROM `bigquery-project-123.emp` AS t1
JOIN `bigquery-project-123.prj` t2
ON t2.PrjID IN (t1.EmpITPrj,t1.EmpFinPrj,t1.EmpHRPrj,t1.EmpIntPrj)
AND SAFE.PARSE_DATE("%Y-%m-%d", t1.EmpDate) BETWEEN
SAFE.PARSE_DATE("%m/%d/%Y",t2.PrjStartDate) AND SAFE.PARSE_DATE("%m/%d/%Y",t2.PrjEndDate)
с результатом
Row EmpNo EmpITPrj EmpFinPrj EmpHRPrj EmpIntPrj EmpDate PrjID PrjStartDate PrjEndDate
1 3 null Fin102 null null 2005-11-25 Fin102 10/14/2005 12/14/2005
2 7 null null HR110 null 2012-08-19 HR110 05/19/2012 08/19/2012
3 10 IT102 null null null 2006-07-11 IT102 07/11/2006 10/30/2006