I have a table which contain sample CDR data in that column A and column B having calling person and called person mobile number I need to find whose having maximum number of calls made(column A) and also need to find to which number(column B) called most
the table structure is like below
calling called
- 889578226 77382596
- 889582256 77382596
- 889582256 7736368296
- 7785978214 782987522
in the above table 889578226 have most number of outgoing calls and 77382596 is most called number in such a way need to get the output
in hive i run like below
SELECT calling_a,called_b, COUNT(called_b) FROM cdr_data GROUP BY calling_a,called_b;
what might be the equalent code for the above query in pig?