I want to be able to create a histogram out of a tuple containing two integers values. Here it is the query: For this input: Would be: How can I create a histogram of those values? In other words, how can I count how many times a row has a duplicate? Answer The question leaves room for interpretation. This test