I have table in MySQL with times spent by customers and I need to find the most busy 30 mins. Expected result is something like multiplerows with time and number of customers: I can easily make 5 sql queries and get the result (I made some view in similar problem https://stackoverflow.com/a/59478411/11078894 ), but I do not know how to get