hi all..i need help.

I have this Supplier table with fields:supplier_num(key),supplier_name,supplier_address,etc.then supplier_TIN.
In this table many suppliers have same TIN number but with different supplier_num.
what I need to do is:
Get the all the data from all the suppliers with distinct TIN number.
With those having the same TIN number,i should only get the supplier having the lowest supplier_num..

Can someone help me how to do the select statement for this one..
It would really be of great help..huhu.
Thanks in advance:-)

Select * from suppliers group by supplier_TIN order by supplier_num desc;

This will list all the records with least supplier_num ..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.