Using BigQuery, How to do a Left Join to Customer Book Table by the closest date on the Customer Score Table? I want to the choose the closest Open_Date_Score that is prior to the Open_Date_Book?
Wanted Results
Using BigQuery, How to do a Left Join to Customer Book Table by the closest date on the Customer Score Table? I want to the choose the closest Open_Date_Score that is prior to the Open_Date_Book?
Wanted Results
Basically, partition your data on ID and rank the date for closeness and then filter the date to show only the closest date. This code should point you in the right direction Customer Book Table=cbt Customer Score Table=cst