$ 0 0 try this SELECT * FROM TBL QUALIFY ROW_NUMBER() OVER (PARTITION BY COUNTRY_DESC ORDER BY COUNTRY_DESC) = 1 SAMPLE 2