I have two data streams, Table1 and Table 2. Each table has a single column, ID. I'd like to join them, but the join condition is unusual. I'd like to join an item from Table1 to Table2 where the Table1.ID is the maximum value less than Table2.ID. Example below.
Table 1:
Table 2:
Desired output:
| Table1.ID | Table2.ID |
| 1 | 2 |
| 1 | 3 |
| 1 | 4 |
| 10 | 11 |
| 10 | 12 |
| 27 | 28 |
| 27 | 29 |
Conceptually this is just a join with a subquery, but I haven't figured out how to approach this in Alteryx. Has anyone worked with this kind of challenge?