SQL Query Multiple Columns Using Distinct on One Column Only

Solution

select ID, Category from t_Con_ChargesAmount where
 ID in (Select max(ID) FROM t_Con_ChargesAmount group by Category)

Explanation

This query will select ID and Category from the table and the Category will be distinct now.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑

Create your own website, free on WordPress.com.Create your own website.
Start free