```sql

drop table if exists t ;
drop table if exists temp ;

CREATE TABLE t
(
    game String,
    round String,
    casino Int32)
ENGINE = MergeTree() ORDER BY (casino, game, round);

CREATE TABLE temp
(
    game String,
    round String,
    casino Int32)
ENGINE = MergeTree() ORDER BY (casino, game, round);

insert into t(casino, game, round)
select number%103, toString(cityHash64(number%999)), toString(number) from numbers(3, 50000000);

insert into temp(casino, game, round)
select number%103, toString(cityHash64(number%999)), toString(number) from numbers(5000);

Q1: SELECT count(*)
FROM temp WHERE (casino, game, round) NOT IN
(     SELECT  casino, game, round
    FROM t
    WHERE (casino, game, round) IN
    (
        SELECT casino, game, round
        FROM temp
    )
)

21.3.1.5944  Elapsed: 4.464 sec. Processed 5.00 thousand rows, 225.89 KB (1.12 thousand rows/s., 50.60 KB/s.)

20.8.11.17    Elapsed: 0.611 sec. Processed 5.00 thousand rows, 225.89 KB (8.18 thousand rows/s., 369.73 KB/s.)

18.14.19.    Elapsed: 0.341 sec. Processed 5.00 thousand rows, 225.89 KB (14.66 thousand rows/s., 662.46 KB/s.)

```
{
    
    auto join_hash = join_element.getTreeHash();
    String join_subquery_id = toString(join_hash.first) + "_" + toString(join_hash.second);
    SubqueryForSet & subquery_for_join = subqueries_for_sets[join_subquery_id];
    
    if (!subquery_for_join.join)
        subquery_for_join.join = tryGetStorageJoin(syntax->analyzed_join);
    if (!subquery_for_join.join)
    {
        
        ExpressionActionsPtr joined_block_actions = createJoinedBlockActions(context, analyzedJoin());
        Names original_right_columns;
        if (!subquery_for_join.source)
        {
            NamesWithAliases required_columns_with_aliases = analyzedJoin().getRequiredColumns(
                joined_block_actions->getSampleBlock(), joined_block_actions->getRequiredColumns());
            for (auto & pr : required_columns_with_aliases)
                original_right_columns.push_back(pr.first);
            /** For GLOBAL JOINs (in the case, for example, of the push method for executing GLOBAL subqueries), the following occurs
                * - in the addExternalStorage function, the JOIN (SELECT ...) subquery is replaced with JOIN _data1,
                *   in the subquery_for_set object this subquery is exposed as source and the temporary table _data1 as the `table`.
                * - this function shows the expression JOIN _data1.
                */
            auto interpreter = interpretSubquery(join_element.table_expression, context, original_right_columns, query_options);
            subquery_for_join.makeSource(interpreter, std::move(required_columns_with_aliases));
        }