Design a site like this with
Get started

SQL Query Multiple Columns Using Distinct on One Column Only


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


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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

Blog at

Up ↑

%d bloggers like this: