Question: Write an Apache Pig query that reports the customer names that have the least number of transactions. Your output should be the customer names, and
Write an Apache Pig query that reports the customer names that have the least number of transactions. Your output should be the customer names, and the number of transactions.
customers = LOAD '/piginput/customers.txt' USING PigStorage(',') AS (id:int,name:chararray,age:int,gender:chararray,CountryCode:int,salary:float);
transactions = LOAD '/piginput/transaction.txt' USING PigStorage(',') as (trans_id:int, id:int, age:int, total:float, num_items:int, description:chararray);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
