A staple in DB2 technical interview questions, be prepared to answer this one. Creating and maintaining an MQT is a two-step process. First, we need to create an MQT based on the needs of the business logic and then refresh the data in the MQT table. Below is an example CREATE TABLE SALES_MQT AS
(SELECT SUM (AMOUNT) AS TOTAL_SUM, DATE
FROM SALES
GROUP BY DATE)
DATA INITIALLY DEFERRED REFRESH DEFERRED;
REFRESH TABLE SALES_MQT;