Adding the CLUSTER BY keyword. It works like SELECT * FROM table CLUSTER BY 50, att1, att2. The columns need to be validaded