I have a table having customer name, and their 2 ids- id 1 and id 2. Id2 is distinct for all customers but id1 is same for some of them. I want to sort the table in descending order on the basis of id 1.
SELECT * FROM table_name ORDER BY id1 DESC
works fine but same id1 should be sorted in descending order on the basis of their id2 value.
someone please help me how to achieve this. thanks.