Key matching conditions: examples

When is the birthday party for each employee?

employees |>
  inner_join(
    parties, 
    join_by(between(birthday, start, end)), 
    unmatched = "error"
  )
## # A tibble: 100 × 6
##   name    birthday       q party      start      end       
##   <chr>   <date>     <int> <date>     <date>     <date>    
## 1 Kemba   2022-01-22     1 2022-01-10 2022-01-01 2022-04-03
## 2 Orean   2022-06-26     2 2022-04-04 2022-04-04 2022-07-10
## 3 Kirstyn 2022-02-11     1 2022-01-10 2022-01-01 2022-04-03
## 4 Amparo  2022-11-11     4 2022-10-03 2022-10-03 2022-12-31
## # ℹ 96 more rows