freq_agg in that you can specify a target number of values to keep, rather than a frequency cutoff.
Samples
Create a topN aggregate over thecountry column of the users table. Targets the top 10 most-frequent values:
type column of the devices table. Estimates the skew of the data to be 1.05, and
targets the 5 most-frequent values: