> Make sure to check documentation https://clickhouse.com/docs/en/ first. If the question is concise and probably has a short answer, asking it in Telegram chat https://telegram.me/clickhouse_en is probably the fastest way to find the answer. For more complicated questions, consider asking them on StackOverflow with "clickhouse" tag https://stackoverflow.com/questions/tagged/clickhouse 

> If you still prefer GitHub issues, remove all this text and ask your question here.

sql【1】:  
`select count()
from (
         SELECT event_dt
         FROM (select event_dt, 403 AS event_id
               from (
                        select event_dt
                        from tba as tba
                        where event_id = 9
                          and ((tba.event_dt >= 20220822 and tba.event_dt <= 20220822))
                        )) tba
         WHERE tba.event_dt >= 20220822
           and tba.event_dt <= 20220822
         );`

sql【2】:
`select count()
from (
         SELECT event_dt
         FROM (select event_dt, 403 AS event_id
               from (
                        select event_dt
                        from tba as tba
                        where event_id = 9
                          and ((tba.event_dt >= 20220822 and tba.event_dt <= 20220822))
                        )) tba
         WHERE tba.event_dt >= 20220822
           and tba.event_dt <= 20220822
           and event_id = 403
         );`

why sql【2】result less data
bool single_point_,
    bool strict_)
    : key_expr(key_expr_)
    , key_subexpr_names(getAllSubexpressionNames(*key_expr))
    , prepared_sets(prepared_sets_)
    , single_point(single_point_)
    , strict(strict_)
{
    for (size_t i = 0, size = key_column_names.size(); i < size; ++i)
    {
        const auto & name = key_column_names[i];
        if (!key_columns.contains(name))
            key_columns[name] = i;
    }
    for (const auto & [name, _] : syntax_analyzer_result->array_join_result_to_source)
        array_joined_columns.insert(name);
    if (!dag_nodes.nodes.empty())
    {
        auto inverted_dag = cloneASTWithInversionPushDown(std::move(dag_nodes.nodes), context);
        
        Block empty;
        for (const auto * node : inverted_dag->getOutputs())
            traverseAST(Tree(node), context, empty);
    }
    else
    {
        rpn.emplace_back(RPNElement::FUNCTION_UNKNOWN);
    }
}
bool KeyCondition::addCondition(const String & column, const Range & range)