Example of a problem I’m trying to solve.
Assume I have a fact table with three columns (Table1).
- user_id
- user_id_creation_date
- favorite_team_id
A user_id is created only once.
And a lookup table (Table2)
- favorite_team_id
- winning_record (Y/N)
- date_of_record
So the team’s record (winning or losing) changes dynamically based on the date_of_record.
Trying to determine if the user joined when their favorite team had a winning or losing record. How to merge or lookup winning_record for favorite_team based for each user_id at the user_id_creation_date based on the nearest or lesser date_of_record ? I can do this in SQL. Just not sure how to do in EM. Any guidance?