finish row and columns with temp tables