I would like to create a graph depicting volume of use of the procedure: hysteroscopy vs ID

I have an extremely large database, tried to plot a histogram and it crashed stata. The problem being as I have a million records.

With this data I would like to plot a graph (see picture) showing the volume of procedures (hysteroscopy) done per individual (represented by ID)
with an average line representing the average number of hysteroscopies (procedures) between them all individuals are done

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input float(ID hyseteroscopy)
1 1
2 0
3 1
2 0
2 0
2 1
3 1
2 1
1 1
end

Array