Skip to content
Advertisement

How to exclude rows with similar columns?

There is a table:

How can I select only the last row with an action == close for each issue_id in one query?

Advertisement

Answer

For these three columns only, aggregation is sufficient:

If you have more columns that you need to display, then use distinct on:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement