Select and group records by time intervals
The section (15*60) sets up a 15 minute interval.  Change 15 to 30 and you've got a 30 minute interval.