Issue in creating Mat view with aggregations in view itself

I was trying to create mat views on over table with some aggregations in views its self.

For referance you cna refer following dummy query:

create materialized view test.dummy_vw as 
select user_id, sum(add_cash)
from test.dummy_table
primary_key (user_id);

Following statement didn’t gets executed.

Does Mat views in scylla Didn’t support aggregation in view itself.

Your statement has a syntax error: it’s PRIMARY KEY, not primary_key in the last line.

1 Like

Other than that you’re right that MVs don’t support aggregates, per doc: Materialized Views | ScyllaDB Docs

If you rewrite your query, you’ll get an explicit error message:

Cannot use general expressions when defining a materialized view

thanks for this info!