I have this class to create a materialized view in PostgreSQL:
class TotalProfit(ExecutionsBase): stmt = ( select( [ T