ClickHouse's datetime functions cover rounding, filtering and duration calculations, demonstrated on about 3 million NYC taxi trips. toStartOfHour and toStartOfFifteenMinutes bucket timestamps, casting to ::Time groups or filters by time of day across all dates, and dateDiff computes trip durations to derive average speed, which falls from about 19 mph at 6am to about 11 mph by 8:30am. countIf with toDayOfWeek splits weekday and weekend trips, and the lag window function computes percentage change between windows. formatDateTime and bar make the output readable.