That's probably beyond the scale level appropriate for a materialized view. For that I'd use something like DBT.