The cast function of sqlhist does not implement .buckets as it does for log2. That is, one could do: sqlhist -e 'select comm,prio,cast(delta as log2) from wakeup_lat' But not: sqlhist -e 'select comm,prio,cast(delta as buckets=10) from wakeup_lat'