I have a table as below

TX_ID Card No. Primary
127 XXXX1234 0
129 XXXX1234 0
1245 XXXX1234 1
1245 XXXX1234 0
1245 XXXX1234 1

Need to fetch the distinct of maximum of TX_ID value where the primary value is 1.
The out put should be

TX_ID Card No. Primary
1245 XXXX1234 1