Add a working SQL example to group measurements into time slots.