The importance of “Sampling” cannot be overstated. The conclusions we draw from the data as well as the quality of the machine-learned model significantly depend on how we sample the data. However, there are many different ways to sample the data and expressing these different ways of sampling in SQL can often be tricky. Below are examples of few sampling techniques that can be easily expressed using the Presto query engine.