Supporting joins in the query builder adds a loft of type level complexity. With the recent addition of `typedSql` , it's better to just write a manual query instead of using the query builder for this.