Counting and reporting uniques is always a challenge as it usually requires a full scan of the dataset to…