Aggregate on X axis (group by)

Hi, my dataset schema is something like that:

account_id | selected_items

I added a column for selected_items_count, so the new schema is:

account_id | selected_items | selected_items_count

I want to group the table by selected_items_count so that I can see the distribution of selection across the accounts, i.e., how many accounts choose x number of items?


The desired result is:

X-axis - # of accounts

Y-axis - # of selected_items


Thanks.

Answers