name sold_price ram 2000 shyam 3000 ram 4000 hari 50000 Want: name sold_price ram 2000 shyam 3000 hari 50000 Show first reference of ram SELECT name,sold_price FROM ( SELECT ID ,name ,sold_price ,ROW_NUMBER() OVER ( PARTITION BY name ORDER BY ID ) rn FROM shop ) a WHERE rn =…