Top 10 products

select
  a.product_id,
  b.name,
  count(distinct a.local_number)
from import.product a 
  join import.products b 
  on a.product_id = b.product_id 
GROUP BY 
  a.product_id,
  b.name
order by 
  count(distinct a.local_number) desc
limit 10;
product_idnamecount
77936REVLIMID157288
45328ENBREL108091
58535REMICADE76957
58830HUMIRA73708
176663ELIQUIS64894
86304PRADAXA51304
47388LYRICA49658
58467AVASTIN39258
49090PLAVIX34943
12129169KEYTRUDA34024