Split table into sub-tables