I have a table named Course
in a Postgres database:
How can I select rows which have course name with latest date? I mean if I have two same course names for one ID, I should only show the latest one as the below result.
Simply, I want only to show the latest row per ("ID", "Course Name").
And what if I have two date columns in table Course
, which are StartDate
& EndDate
and I want to show the same based on EndDate
only?