in reply to Is this possible
For the record, if you do have enormous amounts of information that you need to, say, “cross-tabulate” in this way, you can accomplish the task for arbitrary amounts of data by:
Sorting is an “unexpectedly fast” algorithm that, for large amounts of data, consistently beats-the-pants off of any random-access algorithm. When you saw all those tapes spinning back and forth (actually, if you watched very closely, the tapes never changed direction...) that's what the computers were doing. Back before computers existed, that's also how it was done ... with punched cards. The same principles still apply. They still work like nothing else does.