Some join_by() examples

df <- tibble(id = 1:4, name = c("John", "Simon", "Tracy", "Max"))
df
## # A tibble: 4 × 2
##      id name 
##   <int> <chr>
## 1     1 John 
## 2     2 Simon
## 3     3 Tracy
## 4     4 Max

Doing a self-join with an inequality matching condition to get all name combinations:

df |> inner_join(df, join_by(id < id)) |> print(n = Inf)
## # A tibble: 6 × 4
##    id.x name.x  id.y name.y
##   <int> <chr>  <int> <chr> 
## 1     1 John       2 Simon 
## 2     1 John       3 Tracy 
## 3     1 John       4 Max   
## 4     2 Simon      3 Tracy 
## 5     2 Simon      4 Max   
## 6     3 Tracy      4 Max