I have the following table:
I want to get this table:
I want to get all COL1 having at least 2 distinct COL2 values and to display in the COL2 of the result the distinct COL2 values with the count of all the corresponding COL3 in ().
Thanks in advance for your help.
I am expecting the more optimized SQL query to get the result.