Find out the top 3 integers with the greatest number of occurrences

In the file Integers, there are 100,000 integers and some of them are the same. Please find the top 3 integers with the greatest number of occurrences.

Solution:

A B C D
1 =file("Integers") =A1.cursor@b() >a=0
2 =B1.groupx(Integer;count(~):Count;a) =A2.sortx(-Count)  
3 =B2.fetch(3) >B2.close()  

When using function groupx to group and summarize, a range of temporary data files can be generated according to the summary result, so as to avoid the memory overflow caused by the big data result set.

In A3, the result weĦŻve found is as follows: