```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.)

```
{
    ExpressionActionsChain::Step & step = chain.lastStep(sourceColumns());
    
    auto * expression_step = typeid_cast<ExpressionActionsChain::ExpressionActionsStep *>(&step);
    expression_step->actions_dag = std::move(actions_dag);
    step.required_output.push_back(std::move(column_name));
    step.can_remove_required_output = {true};
    chain.addStep();
}
bool SelectQueryExpressionAnalyzer::appendWhere(ExpressionActionsChain & chain, bool only_types)
{
    const auto * select_query = getSelectQuery();
    if (!select_query->where())
        return false;
    ExpressionActionsChain::Step & step = chain.lastStep(columns_after_join);
    getRootActions(select_query->where(), only_types, step.actions());
    auto where_column_name = select_query->where()->getColumnName();
    step.required_output.push_back(where_column_name);
    step.can_remove_required_output = {true};
    const auto & index = step.actions()->getIndex();
    auto it = index.find(where_column_name);
    if (it == index.end())
        throw Exception(ErrorCodes::UNKNOWN_IDENTIFIER, "Unknown identifier: '{}'", where_column_name);
    auto filter_type = (*it)->result_type;
    if (!filter_type->canBeUsedInBooleanContext())
        throw Exception("Invalid type for filter in WHERE: " + filter_type->getName(),
                        ErrorCodes::ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER);
    return true;
}
bool SelectQueryExpressionAnalyzer::appendGroupBy(ExpressionActionsChain & chain, bool only_types, bool optimize_aggregation_in_order,