This article demonstrates how to use a simple linear regression function within ClickHouse to predict delivery times based on two variables: distance of delivery and pickup hour. The dataset used is a subset of the last-mile delivery dataset by Hugging Face, containing 2,293 orders delivered by a single courier in Jilin, China. The model takes into account both distance and pickup hour as input variables, with the goal of predicting the time elapsed between pickup and delivery. The article showcases how to prepare the data, train the model using ClickHouse's stochasticLinearRegression function, evaluate its performance, and visualize the results. The model performs reasonably well for shorter distances but begins to break down for longer journeys. Despite this, it shows some predictive capability and may perform better in other datasets and domains.