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 comment

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

Create a free website or blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started