Looking for an optimized function for histograms similar to approx_percentile

Hi,
We’re using v7.6 and we’re very satisfied to use approx_percentile in our reports.
Now, we have a new generation of reports that require histograms.
Is there an optimized function for histograms ?