This isn't an alternative to it.
You can still write
``` SELECT country, COUNT() AS num_records FROM t GROUP BY country ```
And then append something like
``` |> EXTEND FLOOR(num_records / 10) 10 AS num_records_bin |> AGGREGATE COUNT(*) AS num_countries GROUP BY num_records_bin ```
to get a histogram without having to nest stuff