Added some sql commands for materialized views