```sql

CREATE MATERIALIZED VIEW player_champ_counts_mv
ENGINE = AggregatingMergeTree() ORDER BY (patch_num, my_account_id, champ_id)
as select patch_num, my_account_id, champ_id, countState() as c_state
from full_info
group by patch_num, my_account_id, champ_id;

create view player_champ_counts as
select patch_num, my_account_id, champ_id, countMerge(c_state) as c
from player_champ_counts_mv
group by patch_num, my_account_id, champ_id;
```

2.4s:
`select * from player_champ_counts`

900ms:
```
select patch_num, my_account_id, champ_id, countMerge(c_state) as c
from player_champ_counts_mv
group by patch_num, my_account_id, champ_id;
```

In other words, just inlining the definition of the view is doing something different than querying the view itself.
std::vector<std::shared_ptr<Context>> interpreter_context;
    std::vector<StoragePtr> storage_holders;
    TableLockHolders table_locks;
    
    Block current_header;
    
    Processors processors;
    
    Streams streams;
    
    OutputPort * totals_having_port = nullptr;
    OutputPort * extremes_port = nullptr;
    
    bool has_resize = false;
    IOutputFormat * output_format = nullptr;
    
    
    size_t max_threads = 0;
    QueryStatus * process_list_element = nullptr;
    void checkInitialized();
    void checkInitializedAndNotCompleted();
    static void checkSource(const ProcessorPtr & source, bool can_have_totals);
    template <typename TProcessorGetter>
    void addSimpleTransformImpl(const TProcessorGetter & getter);
    void initRowsBeforeLimit();
};
}